Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
gh-124452: Fix header mismatches when folding/unfolding with email message#125919
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ghost commentedOct 24, 2024 • edited by ghost
Loading Uh oh!
There was an error while loading.Please reload this page.
edited by ghost
Uh oh!
There was an error while loading.Please reload this page.
Most changes to Pythonrequire a NEWS entry. Add one using theblurb_it web app or theblurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Misc/NEWS.d/next/Library/2024-10-24-10-49-47.gh-issue-124452.eqTRgx.rst OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Misc/NEWS.d/next/Library/2024-10-24-10-49-47.gh-issue-124452.eqTRgx.rst OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
I have made the requested changes; please review again |
Thanks for making the requested changes! @bitdancer: please review the changes made to this pull request. |
Misc/NEWS.d/next/Library/2024-10-24-10-49-47.gh-issue-124452.eqTRgx.rst OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Please specify the method. It seems that you haven't read this link carefully :) |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Misc/NEWS.d/next/Library/2024-10-24-10-49-47.gh-issue-124452.eqTRgx.rst OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
…qTRgx.rstCo-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Thanks, RanKII. Sorry, I missed the update notification, and I only just checked back on the PR. |
ed81971 intopython:mainUh oh!
There was an error while loading.Please reload this page.
Thanks@RanKKI for the PR, and@bitdancer for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Thanks@RanKKI for the PR, and@bitdancer for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…ail message (pythonGH-125919)The header-folder of the new email API has a long standing known buglet whereif the first token is longer than max_line_length, it puts that token on the nextline. It turns out there is also a *parsing* bug when parsing such a header:the space prefixing that first, non-empty line gets preserved and tacked on tothe start of the header value, which is not the expected behavior per the RFCs.The bug arises from the fact that the parser assumed that there would be atleast one token on the line with the header, which is going to be true forprobably every email producer other than the python email library with itsfolding buglet. Clearly, though, this is a case that needs to be handledcorrectly. The fix is simple: strip the blanks off the start of the wholevalue, not just the first physical line of the value.(cherry picked from commited81971)Co-authored-by: RanKKI <hliu86.me@gmail.com>Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
GH-126916 is a backport of this pull request to the3.12 branch. |
…ail message (pythonGH-125919)The header-folder of the new email API has a long standing known buglet whereif the first token is longer than max_line_length, it puts that token on the nextline. It turns out there is also a *parsing* bug when parsing such a header:the space prefixing that first, non-empty line gets preserved and tacked on tothe start of the header value, which is not the expected behavior per the RFCs.The bug arises from the fact that the parser assumed that there would be atleast one token on the line with the header, which is going to be true forprobably every email producer other than the python email library with itsfolding buglet. Clearly, though, this is a case that needs to be handledcorrectly. The fix is simple: strip the blanks off the start of the wholevalue, not just the first physical line of the value.(cherry picked from commited81971)Co-authored-by: RanKKI <hliu86.me@gmail.com>Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
GH-126917 is a backport of this pull request to the3.13 branch. |
…mail message (GH-125919) (#126917)gh-124452: Fix header mismatches when folding/unfolding with email message (GH-125919)The header-folder of the new email API has a long standing known buglet whereif the first token is longer than max_line_length, it puts that token on the nextline. It turns out there is also a *parsing* bug when parsing such a header:the space prefixing that first, non-empty line gets preserved and tacked on tothe start of the header value, which is not the expected behavior per the RFCs.The bug arises from the fact that the parser assumed that there would be atleast one token on the line with the header, which is going to be true forprobably every email producer other than the python email library with itsfolding buglet. Clearly, though, this is a case that needs to be handledcorrectly. The fix is simple: strip the blanks off the start of the wholevalue, not just the first physical line of the value.(cherry picked from commited81971)Co-authored-by: RanKKI <hliu86.me@gmail.com>Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
…mail message (GH-125919) (#126916)gh-124452: Fix header mismatches when folding/unfolding with email message (GH-125919)The header-folder of the new email API has a long standing known buglet whereif the first token is longer than max_line_length, it puts that token on the nextline. It turns out there is also a *parsing* bug when parsing such a header:the space prefixing that first, non-empty line gets preserved and tacked on tothe start of the header value, which is not the expected behavior per the RFCs.The bug arises from the fact that the parser assumed that there would be atleast one token on the line with the header, which is going to be true forprobably every email producer other than the python email library with itsfolding buglet. Clearly, though, this is a case that needs to be handledcorrectly. The fix is simple: strip the blanks off the start of the wholevalue, not just the first physical line of the value.(cherry picked from commited81971)Co-authored-by: RanKKI <hliu86.me@gmail.com>Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
…ail message (python#125919)The header-folder of the new email API has a long standing known buglet whereif the first token is longer than max_line_length, it puts that token on the nextline. It turns out there is also a *parsing* bug when parsing such a header:the space prefixing that first, non-empty line gets preserved and tacked on tothe start of the header value, which is not the expected behavior per the RFCs.The bug arises from the fact that the parser assumed that there would be atleast one token on the line with the header, which is going to be true forprobably every email producer other than the python email library with itsfolding buglet. Clearly, though, this is a case that needs to be handledcorrectly. The fix is simple: strip the blanks off the start of the wholevalue, not just the first physical line of the value.Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Uh oh!
There was an error while loading.Please reload this page.
Fix:#124452