blob: 3f61469ba9ffe5e23c0ada0a21b6f7cee9e158c6 [file] [log] [blame]
[PATCH] Restricting unicode symbols in email address
Drop this patch if working on b/111560384. This was done as backward
compatibility mediation for restricting unicode symbols in email address
to preserve old behavior before sun_mail 1.6.2. See also b/328799105
===================================================================
diff --git a/src/main/java/javax/mail/internet/InternetAddress.java b/src/main/java/javax/mail/internet/InternetAddress.java
--- a/src/main/java/javax/mail/internet/InternetAddress.java (revision cb7bd7e096d480731b4e28e1ba3ab42f2bc1826a)
+++ b/src/main/java/javax/mail/internet/InternetAddress.java (date 1752154026599)
@@ -1361,7 +1361,7 @@
"Local address ends with dot", addr);
break; // done with local part
}
- if (c <= 040 || c == 0177)
+ if (c <= 040 || c >= 0177)
throw new AddressException(
"Local address contains control or whitespace", addr);
if (specialsNoDot.indexOf(c) >= 0)
@@ -1410,7 +1410,7 @@
throw new AddressException(
"Domain literal end not at end of domain", addr);
inliteral = false;
- } else if (c <= 040 || c == 0177) {
+ } else if (c <= 040 || c >= 0177) {
throw new AddressException(
"Domain contains control or whitespace", addr);
} else {