JCheck issue: Handling of capitals in email addresses
Mike Duigou
mike.duigou at oracle.com
Fri Jun 29 16:02:56 PDT 2012
A committer was having trouble pushing a fix with the following contributed by line:
Contributed-by: zhouyx at linux.vnet.ibm.com, Ulf.Zibis at gmx.de, david.holmes at oracle.com
The problem is that "Ulf.Zibis" is capitalized which current JCheck fails to correctly recognize as a valid (though unusual) email address. Per RFC 2821:
> The local-part of a mailbox MUST BE treated as case sensitive. Therefore, SMTP implementations MUST take care to preserve the case of mailbox local-parts. Mailbox domains are not case sensitive. In particular, for some hosts the user "smith" is different from the user "Smith". However, exploiting the case sensitivity of mailbox local-parts impedes interoperability and is discouraged.
Changing from:
base_addr_pat = "[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}"
to:
base_addr_pat = "[a-zA-Z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}"
corrected the problem.
Mike
More information about the hg-tools-dev
mailing list