mail-api
mail-api copied to clipboard
Validation not RFC-822 compliant when mail.mime.allowutf8=false
changes made for Support addressing i18n via RFC 6530/6531/6532 (6216) breaks behavior when mail.mime.allowutf8 is not true
This code in InternetAddress.java does not take into account that setting. If mail.mime.allowutf8 = false, I think the check should still be c >= 0177 instead of c == 0177
if (c <= 040 || c == 0177) throw new AddressException( "Local address contains control or whitespace", addr);
Checking an email address like pé[email protected] used to throw an exception, now it does not, regardless of the value of mail.mime.allowutf8
Yes, you're right, thanks!
Unfortunately, fixing this causes the TCK to fail, so this fix will need to be deferred until the TCK can be fixed as well. In the mean time, the server should fail if given an address that includes characters it doesn't support.
@bshannon was this fixed in the end?