Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34k
gh-143935: Email preserve parens when folding comments#143936
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
gh-143935: Email preserve parens when folding comments#143936
Conversation
- No forced space to indent,- use almost the same code as the `bare-quoted-string`block above, handle nested comments and escaped parenthesisin addition
e.g. with a 40 characters length policy, the below`((loremipsum)(loremipsum)(loremipsum)(loremipsum))<spy@example.org>`should not be folded to`((loremipsum)(loremipsum)(loremipsum)\n(loremipsum))<spy@example.org>`but should rather stay`((loremipsum)(loremipsum)(loremipsum)(loremipsum))<spy@example.org>`to prevent to add a new line not starting with a space / with noindentation
To test a whitespace between two nested comments leads to anew line with one space indentation on folding
3a9b2c7 to8ad0fdbCompare17d1490 intopython:mainUh oh!
There was an error while loading.Please reload this page.
Thanks@sethmlarson for the PR, and@Yhg1s for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11, 3.12, 3.13, 3.14. |
…H-143936)Fix a bug in the folding of comments when flattening an email messageusing a modern email policy. Comments consisting of a very long sequence ofnon-foldable characters could trigger a forced line wrap that omitted therequired leading space on the continuation line, causing the remainder ofthe comment to be interpreted as a new header field. This enabled headerinjection with carefully crafted inputs.(cherry picked from commit 17d1490aa97bd6b98a42b1a9b324ead84e7fd8a2)Co-authored-by: Seth Michael Larson <seth@python.org>Co-authored-by: Denis Ledoux <dle@odoo.com>
…H-143936)Fix a bug in the folding of comments when flattening an email messageusing a modern email policy. Comments consisting of a very long sequence ofnon-foldable characters could trigger a forced line wrap that omitted therequired leading space on the continuation line, causing the remainder ofthe comment to be interpreted as a new header field. This enabled headerinjection with carefully crafted inputs.(cherry picked from commit17d1490)Co-authored-by: Seth Michael Larson <seth@python.org>Co-authored-by: Denis Ledoux <dle@odoo.com>
GH-144034 is a backport of this pull request to the3.14 branch. |
GH-144036 is a backport of this pull request to the3.12 branch. |
GH-144037 is a backport of this pull request to the3.11 branch. |
…H-143936)Fix a bug in the folding of comments when flattening an email messageusing a modern email policy. Comments consisting of a very long sequence ofnon-foldable characters could trigger a forced line wrap that omitted therequired leading space on the continuation line, causing the remainder ofthe comment to be interpreted as a new header field. This enabled headerinjection with carefully crafted inputs.(cherry picked from commit17d1490)Co-authored-by: Seth Michael Larson <seth@python.org>Co-authored-by: Denis Ledoux <dle@odoo.com>
Thanks@sethmlarson for the PR, and@Yhg1s for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Thanks@sethmlarson for the PR, and@Yhg1s for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
Thanks@sethmlarson for the PR, and@Yhg1s for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Thanks@sethmlarson for the PR, and@Yhg1s for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
…H-143936)Fix a bug in the folding of comments when flattening an email messageusing a modern email policy. Comments consisting of a very long sequence ofnon-foldable characters could trigger a forced line wrap that omitted therequired leading space on the continuation line, causing the remainder ofthe comment to be interpreted as a new header field. This enabled headerinjection with carefully crafted inputs.(cherry picked from commit17d1490)Co-authored-by: Seth Michael Larson <seth@python.org>Co-authored-by: Denis Ledoux <dle@odoo.com>
Sorry@sethmlarson and@Yhg1s, I had trouble completing the backport. |
…H-143936)Fix a bug in the folding of comments when flattening an email messageusing a modern email policy. Comments consisting of a very long sequence ofnon-foldable characters could trigger a forced line wrap that omitted therequired leading space on the continuation line, causing the remainder ofthe comment to be interpreted as a new header field. This enabled headerinjection with carefully crafted inputs.(cherry picked from commit17d1490)Co-authored-by: Seth Michael Larson <seth@python.org>Co-authored-by: Denis Ledoux <dle@odoo.com>
Sorry@sethmlarson and@Yhg1s, I had trouble completing the backport. |
…H-143936)Fix a bug in the folding of comments when flattening an email messageusing a modern email policy. Comments consisting of a very long sequence ofnon-foldable characters could trigger a forced line wrap that omitted therequired leading space on the continuation line, causing the remainder ofthe comment to be interpreted as a new header field. This enabled headerinjection with carefully crafted inputs.(cherry picked from commit17d1490)Co-authored-by: Seth Michael Larson <seth@python.org>Co-authored-by: Denis Ledoux <dle@odoo.com>
Sorry@sethmlarson and@Yhg1s, I had trouble completing the backport. |
…H-143936)Fix a bug in the folding of comments when flattening an email messageusing a modern email policy. Comments consisting of a very long sequence ofnon-foldable characters could trigger a forced line wrap that omitted therequired leading space on the continuation line, causing the remainder ofthe comment to be interpreted as a new header field. This enabled headerinjection with carefully crafted inputs.(cherry picked from commit17d1490)Co-authored-by: Seth Michael Larson <seth@python.org>Co-authored-by: Denis Ledoux <dle@odoo.com>
Sorry@sethmlarson and@Yhg1s, I had trouble completing the backport. |
) (#144035)gh-143935: Email preserve parens when folding comments (GH-143936)Fix a bug in the folding of comments when flattening an email messageusing a modern email policy. Comments consisting of a very long sequence ofnon-foldable characters could trigger a forced line wrap that omitted therequired leading space on the continuation line, causing the remainder ofthe comment to be interpreted as a new header field. This enabled headerinjection with carefully crafted inputs.(cherry picked from commit17d1490)Co-authored-by: Seth Michael Larson <seth@python.org>Co-authored-by: Denis Ledoux <dle@odoo.com>
) (#144037)gh-143935: Email preserve parens when folding comments (GH-143936)Fix a bug in the folding of comments when flattening an email messageusing a modern email policy. Comments consisting of a very long sequence ofnon-foldable characters could trigger a forced line wrap that omitted therequired leading space on the continuation line, causing the remainder ofthe comment to be interpreted as a new header field. This enabled headerinjection with carefully crafted inputs.(cherry picked from commit17d1490)Co-authored-by: Seth Michael Larson <seth@python.org>Co-authored-by: Denis Ledoux <dle@odoo.com>
Uh oh!
There was an error while loading.Please reload this page.
cc@beledouxdenis