jasimcse / fsnet

Automatically exported from code.google.com/p/fsnet
0 stars 0 forks source link

underscore not allowed in email addresses in bulk registration #234

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Go to the admin panel, member registration page, bulk registration
2. Fill in a line with an email containing a underscore (a typical uni student 
address for instance)
3. try to register that new member

What is the expected output? What do you see instead?
To register the new member.
Unfortunately, the content verification of the form does not allow underscores 
in email address

Original issue reported on code.google.com by daniel.l...@gmail.com on 10 Feb 2011 at 8:30

GoogleCodeExporter commented 9 years ago
Ok I will check that but it's seems to me that underscore are allowed and 
worked when I tested it, so can you give me the email address that doesn't 
match.

The part of regex that verify email is : 
[\da-zA-Z\._\-]{1,50}@[a-zA-Z\d\-]{1,20}\.[a-zA-Z]{1,10}
It should works with underscore.

It does not match with all address because, you know... the real one is 
apparantly something like that :
(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x0
8\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:
(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25
[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?
|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x
09\x0b\x0c\x0e-\x7f])+)\])
but I can make some improvement if you like.

Original comment by stephane...@gmail.com on 10 Feb 2011 at 9:30

GoogleCodeExporter commented 9 years ago
Ok, so there weren't a problem with underscore but with the multiple "." after 
the "@".
ex : test@test.test.gmail.com

the regex for email is now :
[\da-zA-Z\._\-]{1,50}@([a-zA-Z\d\-]{1,20}\.)+[a-zA-Z]{1,10}

Original comment by stephane...@gmail.com on 10 Feb 2011 at 9:55