Repository navigation
Conversation
RecipientListStringAnalyser.findFirst searched for cc: + personal and cc:" + address + ", but not for cc:" + personal + ". With a quoted display name only the bare personal name matched, so the recipient was classified as TO: a bcc: recipient with a quoted name ended up in the To header. Search for the quoted personal name too.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A
cc:orbcc:prefix in a recipient list is ignored when the recipient has a quoted display name, for examplecc:"Mouse, Mickey" <mickey@example.com>orbcc:"Donald Duck" <donald@example.com>. For "Last, First" names the quotes cannot be dropped: unquoted,cc:Doe, Jane <jane@example.com>is split at the comma intoDoe(Cc) andjane@example.com(To). RFC 5322 also requires the quotes for other names with special characters such as"J. Doe".RecipientListStringAnalyser.findFirstsearches forcc:+ personal andcc:"+address.toString()+", but not forcc:"+ personal +". With a quoted name it only finds the bare personal name, so the entry falls back to To. For abcc:entry that means the address is put in the To header and is visible to all other recipients.This adds the
bcc:"<personal>"andcc:"<personal>"patterns to the search. The existing patterns are unchanged, so unquoted names, bare addresses and the JENKINS-52748 / JENKINS-55128 cases keep their current behaviour. Names containing escaped quotes ("Jane \"JD\" Doe") are still not matched; this change does not try to cover that.Testing done
EmailRecipientUtilsTest#testCCandBCCWithQuotedNames(goes throughconvertRecipientStringwithminnie@disney.com, cc:"Mouse, Mickey" <mickey@disney.com>, bcc:"Donald Duck" <donald@disney.com>): fails on main (To contains all three addresses), passes with the change.RecipientListStringAnalyserTest#getTypeForCcAndBccPrefixedQuotedNames(addresses taken fromInternetAddress.parse, as in production): fails on main, passes with the change.RecipientListStringAnalyserTestand bothEmailRecipientUtilsTestclasses pass (43 tests) with the change;spotless:checkpasses.Note: #1595 also touches
EmailRecipientUtils(switch reformat only); this change is inRecipientListStringAnalyserand the tests.Submitter checklist
This change was drafted with Claude Code (claude-opus-5-5); the test results above are from the runs described.