-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix incorrect parsing of headers containing equal character #7303
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! I have one comment for the changelog fragment, besides that this is good!
Co-authored-by: Felix Fontein <felix@fontein.de>
Backport to stable-6: 💚 backport PR created✅ Backport PR branch: Backported as #7305 🤖 @patchback |
@Theo024 thanks a lot for your contribution! |
* Fix incorrect parsing of header containing equal character * Add changelog fragment * Update changelogs/fragments/7303-mail-incorrect-header-parsing.yml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit f4237dd)
Backport to stable-7: 💚 backport PR created✅ Backport PR branch: Backported as #7306 🤖 @patchback |
* Fix incorrect parsing of header containing equal character * Add changelog fragment * Update changelogs/fragments/7303-mail-incorrect-header-parsing.yml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit f4237dd)
…rs containing equal character (#7305) Fix incorrect parsing of headers containing equal character (#7303) * Fix incorrect parsing of header containing equal character * Add changelog fragment * Update changelogs/fragments/7303-mail-incorrect-header-parsing.yml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit f4237dd) Co-authored-by: Théo Lévesque <Theo024@users.noreply.github.com>
…rs containing equal character (#7306) Fix incorrect parsing of headers containing equal character (#7303) * Fix incorrect parsing of header containing equal character * Add changelog fragment * Update changelogs/fragments/7303-mail-incorrect-header-parsing.yml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit f4237dd) Co-authored-by: Théo Lévesque <Theo024@users.noreply.github.com>
…collections#7303) * Fix incorrect parsing of header containing equal character * Add changelog fragment * Update changelogs/fragments/7303-mail-incorrect-header-parsing.yml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
SUMMARY
Fix mail header parsing that skip headers containing equals characters due to missing maxsplit on header key/value parsing.
ISSUE TYPE
COMPONENT NAME
mail module
ADDITIONAL INFORMATION
For example, the following mail module invocation trigger the bug:
The
split("=")
function applied to split the header key and value generate an error because there are multiples=
characters, but only 2 output values are expected. Adding amaxsplit
of 1 to the split fix the behavior and extract correctly the header key and value.