Bug 982048 - RFE: Use <better email validator> to conform to RFC2822
Summary: RFE: Use <better email validator> to conform to RFC2822
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Zanata
Classification: Retired
Component: WebSite
Version: development
Hardware: All
OS: All
unspecified
medium
Target Milestone: ---
: ---
Assignee: Michelle Kim
QA Contact: Damian Jansen
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-08 02:07 UTC by Damian Jansen
Modified: 2015-07-31 01:19 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-07-31 01:19:50 UTC
Embargoed:


Attachments (Terms of Use)

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


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