-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
BaseHTTPRequestHandler.parse_request() loses client-provided information #99220
Comments
FWIW, this also impacts
|
openstack-mirroring
pushed a commit
to openstack/openstack
that referenced
this issue
Dec 19, 2022
* Update swift from branch 'master' to 0c18b2d32910d507203b72c78fbcef8089ab9e5c - Merge "Inline parse_request from cpython" - Inline parse_request from cpython Applied deltas: - Fix http.client references - Inline HTTPStatus codes - Address request line splitting (https://bugs.python.org/issue33973) - Special-case py2 header-parsing - Address multiple leading slashes in request path (python/cpython#99220) Change-Id: Iae28097668213aa0734837ff21aef83251167d19
openstack-mirroring
pushed a commit
to openstack/swift
that referenced
this issue
Dec 19, 2022
Applied deltas: - Fix http.client references - Inline HTTPStatus codes - Address request line splitting (https://bugs.python.org/issue33973) - Special-case py2 header-parsing - Address multiple leading slashes in request path (python/cpython#99220) Change-Id: Iae28097668213aa0734837ff21aef83251167d19
openstack-mirroring
pushed a commit
to openstack/swift
that referenced
this issue
Dec 19, 2022
Upstream CPython broke our HTTP parsing; while we can fix our own HttpProtocol, previous tags won't have the fix (naturally). See also: python/cpython@4abab6b and python/cpython#99220 Change-Id: Ibe67b1a485350967e37809ba8575a33eba56ee97 Related-Change: https://review.opendev.org/c/openstack/swift/+/863441 Related-Change: https://review.opendev.org/c/openstack/swift/+/866801 (cherry picked from commit d1b2bbd)
openstack-mirroring
pushed a commit
to openstack/swift
that referenced
this issue
Dec 20, 2022
Applied deltas: - Fix http.client references - Inline HTTPStatus codes - Address request line splitting (https://bugs.python.org/issue33973) - Special-case py2 header-parsing - Address multiple leading slashes in request path (python/cpython#99220) Closes-Bug: #1999278 Change-Id: Iae28097668213aa0734837ff21aef83251167d19 (cherry picked from commit 884f553)
openstack-mirroring
pushed a commit
to openstack/swift
that referenced
this issue
Dec 21, 2022
Applied deltas: - Fix http.client references - Inline HTTPStatus codes - Address request line splitting (https://bugs.python.org/issue33973) - Special-case py2 header-parsing - Address multiple leading slashes in request path (python/cpython#99220) Closes-Bug: #1999278 Change-Id: Iae28097668213aa0734837ff21aef83251167d19 (cherry picked from commit 884f553)
openstack-mirroring
pushed a commit
to openstack/swift
that referenced
this issue
Dec 21, 2022
Applied deltas: - Fix http.client references - Inline HTTPStatus codes - Address request line splitting (https://bugs.python.org/issue33973) - Special-case py2 header-parsing - Address multiple leading slashes in request path (python/cpython#99220) Closes-Bug: #1999278 Change-Id: Iae28097668213aa0734837ff21aef83251167d19 (cherry picked from commit 884f553)
openstack-mirroring
pushed a commit
to openstack/swift
that referenced
this issue
Dec 21, 2022
Applied deltas: - Fix http.client references - Inline HTTPStatus codes - Address request line splitting (https://bugs.python.org/issue33973) - Special-case py2 header-parsing - Address multiple leading slashes in request path (python/cpython#99220) Closes-Bug: #1999278 Change-Id: Iae28097668213aa0734837ff21aef83251167d19 (cherry picked from commit 884f553)
openstack-mirroring
pushed a commit
to openstack/swift
that referenced
this issue
Jan 7, 2023
Applied deltas: - Fix http.client references - Inline HTTPStatus codes - Address request line splitting (https://bugs.python.org/issue33973) - Special-case py2 header-parsing - Address multiple leading slashes in request path (python/cpython#99220) Closes-Bug: #1999278 Change-Id: Iae28097668213aa0734837ff21aef83251167d19 (cherry picked from commit 884f553)
openstack-mirroring
pushed a commit
to openstack/swift
that referenced
this issue
Jan 7, 2023
Applied deltas: - Fix http.client references - Inline HTTPStatus codes - Address request line splitting (https://bugs.python.org/issue33973) - Special-case py2 header-parsing - Address multiple leading slashes in request path (python/cpython#99220) Closes-Bug: #1999278 Change-Id: Iae28097668213aa0734837ff21aef83251167d19 (cherry picked from commit 884f553)
openstack-mirroring
pushed a commit
to openstack/swift
that referenced
this issue
Jan 7, 2023
Applied deltas: - Fix http.client references - Inline HTTPStatus codes - Address request line splitting (https://bugs.python.org/issue33973) - Special-case py2 header-parsing - Address multiple leading slashes in request path (python/cpython#99220) Closes-Bug: #1999278 Change-Id: Iae28097668213aa0734837ff21aef83251167d19 (cherry picked from commit 884f553)
The path mangling is not documented. The change in question seems to be commit defaa2b. Perhaps it should have only been made in the SimpleHTTPRequestHandler class, not BaseHTTPRequestHandler. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
The fix for #87389 prevents servers from handling request paths with multiple leading slashes.
For example, one might have a simple server that just reflects the request path:
Previously, this would faithfully mirror the request path from the client:
But now it mangles it:
This impacts any servers that subclass
BaseHTTPRequestHandler
, such as eventlet's WSGI server.The text was updated successfully, but these errors were encountered: