jakartaee / jakartaee/mail-api
Validation not RFC-822 compliant when mail.mime.allowutf8=false
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 285
- Forks
- 109
- Avg merge
- 15h 19m
- Merged PRs (30d)
- 1
Description
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éle@gmail.com used to throw an exception, now it does not, regardless of the value of mail.mime.allowutf8
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read InternetAddress.java and trace the character validation for local addresses, focusing on how mail.mime.allowutf8 affects it. Reproduce the péle@gmail.com case with the setting disabled and enabled, then verify that non-UTF-8 validation rejects the address while UTF-8 mode retains the intended behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100