jakartaee / jakartaee/mail-api

Validation not RFC-822 compliant when mail.mime.allowutf8=false

Open Beginner friendly
#374 7 comments 3 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.