Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email validation is too lax #1347

Closed
ebruchez opened this issue Oct 22, 2013 · 3 comments
Closed

Email validation is too lax #1347

ebruchez opened this issue Oct 22, 2013 · 3 comments

Comments

@ebruchez
Copy link
Collaborator

  • Email address ending with "/" is valid, e.g. info@orbeon.com/.
  • Email with no TLD (or just TLD) is considered valid, e.g. info@orbeon. While in some contexts such email might be valid, it doesn't make much sense to accept it as valid in the context of a web form.
@ghost ghost assigned ebruchez Oct 22, 2013
@ebruchez ebruchez modified the milestones: Consider for 4.7, Review Apr 16, 2014
@avernet avernet changed the title Email address ending with "/" is valid Email validation is too lac Jun 11, 2014
@avernet avernet changed the title Email validation is too lac Email validation is too lax Jun 11, 2014
@avernet
Copy link
Collaborator

avernet commented Jun 11, 2014

Updated title to make this issue more general, and added case of the missing TLD.

+1 from customer

@ebruchez ebruchez modified the milestones: 4.7, Consider for 4.7 Jun 26, 2014
@avernet
Copy link
Collaborator

avernet commented Jun 27, 2014

I was hoping we could use JavaMail for this, but unfortunately, info@orbeon.com/ passes the validation.

import javax.mail.internet.InternetAddress
val email = new InternetAddress("info@orbeon.com/")
email.validate()

@avernet
Copy link
Collaborator

avernet commented Jun 27, 2014

Apache Validator does a better job:

import org.apache.commons.validator.routines.EmailValidator
EmailValidator.getInstance(false).isValid("info@orbeon.com/")

@avernet avernet assigned avernet and unassigned ebruchez Jun 27, 2014
avernet added a commit that referenced this issue Jun 27, 2014
- a@b.com/ is invalid.
- a@b is invalid.
- Add test for valid case (a@b.com).
@ebruchez ebruchez modified the milestones: 4.6.1, 4.7 Jun 27, 2014
avernet added a commit that referenced this issue Jun 27, 2014
- a@b.com/ is invalid.
- a@b is invalid.
- Add test for valid case (a@b.com).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants