Closed (fixed)
Project:
Drupal core
Version:
4.6.0
Component:
base system
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
22 Apr 2005 at 05:00 UTC
Updated:
14 Aug 2005 at 10:22 UTC
Jump to comment: Most recent file
When attemping to use a sub-domain email address for a new account, it won't pass the syntax test. We know that its really the base - but I'm sure a lot of end uers don't know.
newaccount@research.drupal.org - this type of address will fail, though it is actually legal
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | valid_email.patch | 1.31 KB | killes@www.drop.org |
Comments
Comment #1
CdnStrangequark commentedNot just sub-domain emails. If you have an email address of the form: "first.last@somewhere.com" it will also fail even though this is perfectly valid.
Comment #2
CdnStrangequark commentedAfter attempting to enter more emails on one of my new sites, I also discovered that the validation fails in yet more perfectly valid cases. For example: "myemail@somewhere.xx" where xx is the country domain code. (like .ca, or .us). Not all country codes are accepted.
Here is a replacement I made for the code in common.inc: valid_email_address($mail) that works just great:
The only thing this doesn't do is allow for "user@localhost" but does anyone really do that anyway? The code could be modified to do it through an alternate check on $domain though.
PS: I left this post's status as active and unassigned cause I'm kinda new here and don't know the process for submitting patches and bug fixes. Hope someone can put this code in the core though cause I'm sure we're not the only ones who have run into the problem.
Comment #3
killes@www.drop.org commentedOur intrepid Debian developer has cooked up a patch. It is based on RFC 2822 but it needs testing.
Comment #4
Cvbge commentedPlease add a button 'I know my email is good, accept it!' that would be displayed when email is found invalid.
Comment #5
dries commentedUsing Drupal HEAD, the following code returns 3 x
TRUE:Looking at the code,
valid_email_address()in HEAD is no different from the one in DRUPAL-4-6.In short: I can't reproduce this problem.
Comment #6
dries commented