Bug 982048 - RFE: Use <better email validator> to conform to RFC2822
RFE: Use <better email validator> to conform to RFC2822
Product: Zanata
Classification: Community
Component: WebSite (Show other bugs)
All All
unspecified Severity medium
: ---
: ---
Assigned To: Michelle Kim
Damian Jansen
Depends On:
  Show dependency treegraph
Reported: 2013-07-07 22:07 EDT by Damian Jansen
Modified: 2015-07-30 21:19 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-07-30 21:19:50 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Damian Jansen 2013-07-07 22:07:56 EDT
Description of problem:
Non unicode characters not rejected by email validation

Version-Release number of selected component (if applicable):

How reproducible:
Easily, always

Steps to Reproduce:
1. Go to $server:port/zanata/account/register
2. Enter あいうえお@example.com into the email field, press Tab
3. Bug: No "not a well-formed email address" message
4. Fill out the rest of the fields, press Register

Actual results:
Current Errors:
    Transaction failed
    Unexpected error. Please try again. [ Request: ? ] 

Expected results:
Should have been rejected on the Register page via field validation
Comment 1 Damian Jansen 2013-07-08 00:28:37 EDT
Along with the above example, the inline email validation fails to recognise many other invalid entities (e.g. email@-domain.com) - though these seem to be picked up afterwards by java mail handling.

More importantly, however, is that valid email addresses are being rejected - such as:
"email"@domain.com (quoted strings are acceptable)
email@[domain.com] (bracketed domains are acceptable)

A test should be devised to handle all of the cases from the front-end and the validation upgraded to comply.
Comment 2 Sean Flanigan 2013-07-08 01:06:06 EDT
As mentioned in the Hibernate EmailValidator docs, it may not be worth trying to catch everything: http://docs.jboss.org/hibernate/validator/4.3/api/org/hibernate/validator/internal/constraintvalidators/EmailValidator.html

It is better to let an invalid address through to the mail system, than to disallow a user's valid address.

However, to handle the edge cases better, we could replace or augment Hibernate EmailValidator with an implementation which calls JavaMail's "new InternetAddress(email).validate()"
Comment 4 Damian Jansen 2015-07-13 20:20:20 EDT
Reassigned to PM
Comment 5 Zanata Migrator 2015-07-30 21:19:50 EDT
Migrated; check JIRA for bug status: http://zanata.atlassian.net/browse/ZNTA-432

Note You need to log in before you can comment on or make changes to this bug.