Bug 982048

Summary: RFE: Use <better email validator> to conform to RFC2822
Product: [Retired] Zanata Reporter: Damian Jansen <djansen>
Component: WebSiteAssignee: Michelle Kim <mkim>
Status: CLOSED UPSTREAM QA Contact: Damian Jansen <djansen>
Severity: medium Docs Contact:
Priority: unspecified    
Version: developmentCC: sflaniga, zanata-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-31 01:19:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Damian Jansen 2013-07-08 02:07:56 UTC
Description of problem:
Non unicode characters not rejected by email validation

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

How reproducible:
Easily, always

Steps to Reproduce:
1. Go to $server:port/zanata/account/register
2. Enter あいうえお 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 04:28:37 UTC
Along with the above example, the inline email validation fails to recognise many other invalid entities (e.g. email) - 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 05:06:06 UTC
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-14 00:20:20 UTC
Reassigned to PM

Comment 5 Zanata Migrator 2015-07-31 01:19:50 UTC
Migrated; check JIRA for bug status: http://zanata.atlassian.net/browse/ZNTA-432