View Issue Details

IDProjectCategoryView StatusLast Update
0010767mantisbtemailpublic2009-10-07 14:19
Reporteryw84ever Assigned Tojreese  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.0rc1 
Target Version1.2.0rc2Fixed in Version1.2.0rc2 
Summary0010767: email addresses containing upper case characters are considered invalid
Description

email addresses containing upper case characters are considered invalid

although email addresses are not case sensitive, i would expect mantisbt to accept addresses in any variation of upper and lower case

Steps To Reproduce

create a new account
enter an email address in the format
Firstname.Lastname@CompanyName.com

mantis 1.20rc1 reports that this address is invalid

try again but using
firstname.lastname@companyname.com

and mantisbt accepts the address

Additional Information

the regex in
function email_regex_simple()
http://www.mantisforge.org/dev/phpxref/nav.html?core/email_api.php.source.html#l54
only accepts lower case characters

TagsNo tags attached.

Activities

yw84ever

yw84ever

2009-07-25 06:07

reporter   ~0022552

i meant
MantisBT 1.2.0rc1

instead of "mantis 1.20rc1"

as shown in the 'steps to reproduce'

yw84ever

yw84ever

2009-07-26 05:08

reporter   ~0022557

email address
"Firstname.Lastname@CompanyName.com"
was allowed using mantis 1.1.8
but fails with 1.2.0rc1

switching to all lower case works

and switching the 'host' part to lower case works, ie
Firstname.Lastname@companyname.com

ischilling

ischilling

2009-07-26 14:35

reporter   ~0022560

I found the same issue and as a work around, simply deactivated Email verification - which can't be a long term work around of course ;)

vboctor

vboctor

2009-07-26 23:53

manager   ~0022561

Marked as confirmed and targeted for 1.2.x release given that this is a regression and likely to be a trivial fix. That said, patches would be welcome until one of the dev team gets to it.

yw84ever

yw84ever

2009-07-31 07:34

reporter   ~0022632

easy enough as wrapping the email in a to lower call?

$ git diff email_api.php
diff --git a/www/core/email_api.php b/www/core/email_api.php
index 4d9f623..00938f8 100644
--- a/www/core/email_api.php
+++ b/www/core/email_api.php
@@ -86,7 +86,9 @@ function email_is_valid( $p_email ) {

    # Use a regular expression to check to see if the email is in valid format
    #  x-xx.xxx@yyy.zzz.abc etc.
  • if( preg_match( email_regex_simple(), $p_email, $t_check ) ) {
  • consider email as all lower case since callers to email_regex_simple

  • need to address case

  • if( preg_match( email_regex_simple(), strtolower($p_email), $t_check ) ) {
    $t_local = $t_check[1];
    $t_domain = $t_check[2];
jreese

jreese

2009-09-04 15:51

reporter   ~0022881

Fix committed to 1.2.x and master branches.