Closed Bug 465248 Opened 16 years ago Closed 16 years ago

Ampersand ('&') is a legal character in email addresses, but Bugzilla doesn't respect this

Categories

(Bugzilla :: User Accounts, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 279016

People

(Reporter: smjg, Unassigned)

References

()

Details

Section 3.2.4 of RFC 2822 defines '&' to be a legal character in email addresses.  Nonetheless, Bugzilla rejects any email address containing such a character.

Steps to reproduce:
1. Visit https://landfill.bugzilla.org/bugzilla-tip/userprefs.cgi?tab=account
2. Enter under "New email address" a valid email address that contains a '&'
3. Press Submit Changes.

Actual results:
An error page is returned:
The e-mail address you entered (sm&jg@example.com) didn't pass our syntax checking for a legal email address. A legal address must contain exactly one '@', and at least one '.' after the @, a legal top-level domain after the last '.', and may not contain any commas or spaces. It must also not contain any of these special characters: \ ( ) & < > , ; : " [ ], or any whitespace.

Expected results:
Accept the email address.  And adjust the error message accordingly.

I have looked through the RFC and found the following:

all ASCII symbols: !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
specials:           "     ()  , . :;< > @[\]
atext:             ! #$%&'  *+ - /   = ?    ^_`{|}~
Bugzilla rejects:   "   & ()  ,   :;< >  [\]

Notice that, apart from '.' and '@', which are structural parts of an email address, the only difference between 'specials' and the set that's rejected according to Bugzilla's error message is '&'.
Submission of this seems to have brought out a related issue - when Bugzilla links email addresses, it assumes that any '&' is punctuation outside of the email address.
That's not the only one character we currently exclude from email addresses. Same root cause as bug 279016.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.