Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
bitdancer merged 15 commits intopython:mainfromRanKKI:fix-issue-124452
Nov 16, 2024

Conversation

@RanKKI
Copy link
Contributor

@RanKKIRanKKI commentedOct 24, 2024
edited by bedevere-appbot
Loading

@RanKKIRanKKI requested a review froma team as acode ownerOctober 24, 2024 10:45
@ghost
Copy link

ghost commentedOct 24, 2024
edited by ghost
Loading

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app
Copy link

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 theskip news label instead.

@bedevere-app
Copy link

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 phraseI have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@RanKKI
Copy link
ContributorAuthor

I have made the requested changes; please review again

@bedevere-app
Copy link

Thanks for making the requested changes!

@bitdancer: please review the changes made to this pull request.

@rruuaanng
Copy link
Contributor

Please specify the method. It seems that you haven't read this link carefully :)

RanKKIand others added3 commitsOctober 27, 2024 10:13
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>
@bitdancer
Copy link
Member

Thanks, RanKII. Sorry, I missed the update notification, and I only just checked back on the PR.

@bitdancerbitdancer merged commited81971 intopython:mainNov 16, 2024
38 of 39 checks passed
@bitdancerbitdancer added needs backport to 3.12only security fixes needs backport to 3.13bugs and security fixes labelsNov 16, 2024
@miss-islington-app
Copy link

Thanks@RanKKI for the PR, and@bitdancer for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Thanks@RanKKI for the PR, and@bitdancer for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestNov 16, 2024
…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>
@bedevere-app
Copy link

GH-126916 is a backport of this pull request to the3.12 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.12only security fixes labelNov 16, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestNov 16, 2024
…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>
@bedevere-app
Copy link

GH-126917 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelNov 16, 2024
bitdancer pushed a commit that referenced this pull requestNov 17, 2024
…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>
bitdancer pushed a commit that referenced this pull requestNov 17, 2024
…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>
ebonnal pushed a commit to ebonnal/cpython that referenced this pull requestJan 12, 2025
…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>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@picnixzpicnixzpicnixz left review comments

@ZeroIntensityZeroIntensityZeroIntensity left review comments

@bitdancerbitdancerbitdancer approved these changes

+1 more reviewer

@rruuaanngrruuaanngrruuaanng left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Parsing adds whitespace to the front of long headers

5 participants

@RanKKI@rruuaanng@bitdancer@picnixz@ZeroIntensity

[8]ページ先頭

©2009-2025 Movatter.jp