GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-144370: Disallow usage of control characters in status in ``Lib/wsgiref/handlers.py`` for security by benediktjohannes · Pull Request #144371 · python/cpython Conversation
|
|
Important note: This PR needs backport to 3.10, 3.11, 3.12, 3.13 and 3.14 please, thanks! 👍 (I'll probably add these tomorrow if there are no concerns.) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@gpshead or @StanFromIreland / @ZeroIntensity please review, thanks! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
What is different from #144118? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I would suggest that you directly comment on Seth's PR instead. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@picnixz I guess that this was a misunderstanding, this PR is about a completely different thing that is changes. This is not a duplicate of the other PR because the other one is about adding HTAB again to Lib/wsgiref/headers.py, but this one is about Lib/wsgiref/handlers.py, not headers.py. This is something completely different because the other one only adds one character to be allowed, but this one reguards disallowing several characters in handlers.py (and not headers.py) which wasn‘t mentioned at all in the other PR because this concerns completely different aspects like status and some changes in debug mode in handlers.py and not headers.py. Please reopen. Thanks! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@picnixz I guess, I know why this seemed to be a duplicate as I described the „differences“ to the other PR and then you thought that this was about some changes that I suggested for the other PR, but this is not what this PR is about because this is about something completely different in another location, so please reopen. Thanks! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
And I think that is would not be a very good idea if we combined these changes in another PR because the first one was already merged two weeks ago and the other one is only about adding allowed phrases again while this one is about the opposit (disallowing phrases) with the only thing in common that this one does not disallow one thing which will be added in the new PR again, but both other PRs concern another location which makes this not even a duplication in that way, so please reopen. Thanks! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thank you very much! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
You should write tests for theses changes.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Victor Stinner <[email protected]>
|
Hi @vstinner thank you very much for your review! I really like your suggestions and I'll make some commits in order to get them in the PR soon, thank you very much! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Victor Stinner <[email protected]>
|
(Added the "re" again because it's included in vstinner's regex and also in sethmlarson's PR so if this will be used in both cases then it's consistent in that way and it would take too much time to change this there as well and the suggestions by seth and vstinner were both with the "re", so I've added it) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'm not quite sure about the status whether it should be handled as a value or a name, so please correct me if I'm mistaken inthis case (or even none of both? but I don't think that) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Tests are basically already included by seth's PR, but I can of course add similar ones to handlers as well. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Please add new tests on handlers. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@vstinner please re-review, thanks! (I'm still not quite sure about it because I haven't tested it (also the tests are not tested) or is this automatically done by the lint check?) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
(but even if this is done by the lint check automatically, I'm not quite sure about the handling of the status) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
and thanks for the review by the way 👍 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ahh, this seems actually to be checked automatically by the Tests based on what I've seen! Nice! But I'm not quite sure about the correct classification of the status nevertheless, so please have a look there, thanks! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-145585 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-145586 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I merged the change and backported it to 3.13 and 3.14 branches. Thanks for the fix. I'm not sure about backporting the change to 3.10, 3.11 and 3.12 security branches. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…sgiref.handlers for security (GH-144371) (#145585) gh-144370: Disallow usage of control characters in status in wsgiref.handlers for security (GH-144371) Disallow usage of control characters in status in wsgiref.handlers to prevent HTTP header injections. (cherry picked from commit d931725) Co-authored-by: Benedikt Johannes <[email protected]> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Victor Stinner <[email protected]>
…sgiref.handlers for security (GH-144371) (#145586) gh-144370: Disallow usage of control characters in status in wsgiref.handlers for security (GH-144371) Disallow usage of control characters in status in wsgiref.handlers to prevent HTTP header injections. (cherry picked from commit d931725) Co-authored-by: Benedikt Johannes <[email protected]> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Victor Stinner <[email protected]>
|
Thanks @benediktjohannes for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @benediktjohannes for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @benediktjohannes for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, @benediktjohannes and @vstinner, I could not cleanly backport this to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, @benediktjohannes and @vstinner, I could not cleanly backport this to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…giref.handlers for security (pythonGH-144371) Disallow usage of control characters in status in wsgiref.handlers to prevent HTTP header injections. (cherry picked from commit d931725) Co-authored-by: Benedikt Johannes <[email protected]> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Victor Stinner <[email protected]>
|
GH-145671 is a backport of this pull request to the 3.12 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-145672 is a backport of this pull request to the 3.11 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-145673 is a backport of this pull request to the 3.10 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…giref.handlers for security (python#144371) Disallow usage of control characters in status in wsgiref.handlers to prevent HTTP header injections. Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Victor Stinner <[email protected]>
…sgiref.handlers for security (GH-144371) (#145671) gh-144370: Disallow usage of control characters in status in wsgiref.handlers for security (GH-144371) Disallow usage of control characters in status in wsgiref.handlers to prevent HTTP header injections. (cherry picked from commit d931725) Co-authored-by: Benedikt Johannes <[email protected]> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Victor Stinner <[email protected]> Co-authored-by: Stan Ulbrych <[email protected]>
…s in wsgiref.handlers for security (python#144371) (python#145673) (cherry picked from commit 10cf7e2)
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.