Skip to content

Handle comments in angled address specs in InternetAddress.parse()#764

Open
chu3laman wants to merge 1 commit intojakartaee:masterfrom
chu3laman:bug/InternetAddress-does-not-ignore-comments-in-angled-address-spec
Open

Handle comments in angled address specs in InternetAddress.parse()#764
chu3laman wants to merge 1 commit intojakartaee:masterfrom
chu3laman:bug/InternetAddress-does-not-ignore-comments-in-angled-address-spec

Conversation

@chu3laman
Copy link
Contributor

InternetAddress.parse() fails to handle comments (text) within angled address specifications <email@domain.com (comment)>. The main parsing loop correctly skips comments, but the angled address parser (inside case '<':) lacks comment handling, causing comments to be treated as part of the email address.

Fix: Add comment parsing logic to the angled address parser, mirroring the existing comment handling in the main parsing loop. This ensures comments within < > are properly skipped and not included in the final email address.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant