Details
Description
This bug is a problem of the Apache Commons EmailValidator.java but used by Grails. Evident in version 1.1 up to 2.0.3 (please close ticket if already fixed in newer release).
If an email contains more than 10 subdomains (a hard-coded restriction), then the following email (n@a.a.a.a.a.a.a.a.a.a.a.a.a.a.com) results in:
java.lang.ArrayIndexOutOfBoundsException: 10
at org.apache.commons.validator.EmailValidator.isValidSymbolicDomain(EmailValidator.java:201)
at org.apache.commons.validator.EmailValidator.isValidDomain(EmailValidator.java:140)
at org.apache.commons.validator.EmailValidator.isValid(EmailValidator.java:111)
RFC822 provides for unlimited subdomains, and RFC1035 only requires that each label be at most 63 characters and total domain be under 255.
According to http://commons.apache.org/validator/apidocs/org/apache/commons/validator/EmailValidator.html, the isValidSymbolicDomain() method is deprecated. Grails should be updated to use a new package as org.apache.commons.validator is "Deprecated. Use the new EmailValidator in the routines package. This class will be removed in a future release."
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits