8000 bpo-21315: Fix parsing of encoded words with missing leading ws. by maxking · Pull Request #13425 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-21315: Fix parsing of 8000 encoded words with missing leading ws. #13425

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

Merged
merged 2 commits into from
Jun 5, 2019

Conversation

maxking
Copy link
Contributor
@maxking maxking commented May 19, 2019

Because of missing leading whitespace, encoded word would get parsed as
unstructured token. This patch fixes that by looking for encoded words when
splitting tokens with whitespace.

Missing trailing whitespace around encoded word now register a defect
instead.

Original patch suggestion by David R. Murray on bpo-21315.

https://bugs.python.org/issue21315

Because of missing leading whitespace, encoded word would get parsed as
unstructured token. This patch fixes that by looking for encoded words when
splitting tokens with whitespace.

Missing trailing whitespace around encoded word now register a defect
instead.

Original patch suggestion by David R. Murray on bpo-21315.
@bedevere-bot
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 phrase I 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.

@maxking
Copy link
Contributor Author
maxking commented May 23, 2019

I have made the requested changes; please review again.

@bedevere-bot
Copy link

Thanks for making the requested changes!

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

@bitdancer
Copy link
Member

I'm sorry, but is there any way you could do this over using a separate commit to show the changes from the base PR? It is hard to review your fixes from a force push, because I can't see the diff between the fixed version and the code I originally looked at. (Although, it's been so long since I've done a review outside of 'reviewable' that I don't remember if github reviews actually let me see the diff along with the associated comment or not :) But even if not, it is still much easier to check for the requested changes looking at a commit diff than looking at a completely changed PR.

@maxking
Copy link
Contributor Author
maxking commented May 23, 2019

@bitdancer Done. The 2nd commit includes the changes that you requested. I had to force push again to split the changes into two commits.

I will keep it in mind next time to keep the requested changes after a review in a separate commit.

@maxking
Copy link
Contributor Author
maxking commented May 23, 2019

Also, I don't think you can see the comments after I made the changes if those lines change/go away. You can see the old diff with comments and then the new changes I made (which is now separated out in a separate commit), but might have to do a bit of jumping between them or seeing them side by side.

@maxking
Copy link
Contributor Author
maxking commented Jun 5, 2019

This is also not a security issue, so perhaps the backport t0 3.6 label isn't required.

@warsaw warsaw dismissed bitdancer’s stale review June 5, 2019 16:56

LGTM and we want to land this

@warsaw warsaw merged commit 66c4f3f into python:master Jun 5, 2019
@bedevere-bot
Copy link

@warsaw: Please replace # with GH- in the commit message next time. Thanks!

@miss-islington
Copy link
Contributor
< 8000 /h3>

Thanks @maxking for the PR, and @warsaw for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 5, 2019
…honGH-13425)

* bpo-21315: Fix parsing of encoded words with missing leading ws.

Because of missing leading whitespace, encoded word would get parsed as
unstructured token. This patch fixes that by looking for encoded words when
splitting tokens with whitespace.

Missing trailing whitespace around encoded word now register a defect
instead.

Original patch suggestion by David R. Murray on bpo-21315.
(cherry picked from commit 66c4f3f)

Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
@bedevere-bot
Copy link

GH-13846 is a backport of this pull request to the 3.7 branch.

warsaw pushed a commit that referenced this pull request Jun 6, 2019
…13425) (#13846)

* bpo-21315: Fix parsing of encoded words with missing leading ws.

Because of missing leading whitespace, encoded word would get parsed as
unstructured token. This patch fixes that by looking for encoded words when
splitting tokens with whitespace.

Missing trailing whitespace around encoded word now register a defect
instead.

Original patch suggestion by David R. Murray on bpo-21315.
(cherry picked from commit 66c4f3f)

Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
epicfaace pushed a commit to epicfaace/cpython that referenced this pull request Sep 3, 2019
pythonGH-13425) (pythonGH-13846)

* bpo-21315: Fix parsing of encoded words with missing leading ws.

Because of missing leading whitespace, encoded word would get parsed as
unstructured token. This patch fixes that by looking for encoded words when
splitting tokens with whitespace.

Missing trailing whitespace around encoded word now register a defect
instead.

Original patch suggestion by David R. Murray on bpo-21315.
(cherry picked from commit 66c4f3f)

Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
(cherry picked from commit dc20fc4)

Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
miss-islington pushed a commit that referenced this pull request Sep 3, 2019
…GH-13425) (GH-15655)

* [bpo-21315](https://bugs.python.org/issue21315): Fix parsing of encoded words with missing leading ws.

Because of missing leading whitespace, encoded word would get parsed as
unstructured token. This patch fixes that by looking for encoded words when
splitting tokens with whitespace.

Missing trailing whitespace around encoded word now register a defect
instead.

Original patch suggestion by David R. Murray on [bpo-21315](https://bugs.python.org/issue21315).
(cherry picked from commit 66c4f3f)

Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
(cherry picked from commit dc20fc4)

Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>





https://bugs.python.org/issue21315
@epicfaace
Copy link
Contributor

@maxking might we need to backport this to 3.6 and 3.5? Although #13425 wasn't added to 3.6/3.5, there might be a chance that an infinite loop might affect those versions.

@maxking maxking deleted the bpo-21315 branch September 3, 2019 20:16
@maxking
Copy link
Contributor Author
maxking commented Sep 3, 2019

@epicfaace The infinite loop was a result of this PR, so I don't think it does need to be backported to those versions.

Having said that, if you can find out a test case that can be used to trigger an infinite loop in 3.6/3.5, let me know.

@epicfaace
Copy link
Contributor

Yeah, I just tested the new test cases on 3.6 and 3.5, and although some tests fail, none of the tests goes in an infinite loop. Thanks.

DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
…hon#13425)

* bpo-21315: Fix parsing of encoded words with missing leading ws.

Because of missing leading whitespace, encoded word would get parsed as
unstructured token. This patch fixes that by looking for encoded words when
splitting tokens with whitespace.

Missing trailing whitespace around encoded word now register a defect
instead.

Original patch suggestion by David R. Murray on bpo-21315.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants
0