-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-87389: avoid treating path as URI with netloc #93894
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
Open
nascheme
wants to merge
19
commits into
python:main
Choose a base branch
from
nascheme:urlunsplit_relative
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+83
−17
Open
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
4f76c44
wip: alternative fix for gh-87389
nascheme 06b3879
Don't strip slashes if not building relative URL.
nascheme 00a3a92
Add unit test for urlunsplit relative URL case.
nascheme a8e1cc2
sanitize paths that can be confused as scheme
nascheme 83c8332
Add blurb.
nascheme f99e80b
Improve name and comment for _get_redirect_url().
nascheme e542578
Add urllib.parse.pathsplit() function.
nascheme b7b0b15
Fix blurb formating, add note about pathsplit().
nascheme 6915331
Improve comments and docs.
nascheme 915451c
Add basic unit test for pathsplit().
nascheme 952a0f4
Fix markup in blurb.
nascheme 899f512
Use pathsplit() in translate_path().
nascheme a00656c
Improved unit tests from gps.
nascheme 8985853
Add test for Request-URI containing scheme.
nascheme f1f94ae
Make _get_redirect_url() into a method.
nascheme 8a34cd0
Futher cleanups, remove urllib.parse.pathsplit().
nascheme 23d4b56
reword news
gpshead 7a71381
Merge branch 'main' into urlunsplit_relative
serhiy-storchaka d18bbd9
Merge branch 'main' into urlunsplit_relative
serhiy-storchaka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix markup in blurb.
- Loading branch information
commit 952a0f46d19d0163fed3a3e4178243b07750feb4
There are no files selected for viewing
7 changes: 4 additions & 3 deletions
7
Misc/NEWS.d/next/Security/2022-06-16-12-13-55.gh-issue-87389.MS9wAR.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
:mod:`http.server`: Fix an open redirection vulnerability in the HTTP server | ||
when an URI path starts with ``//``. Vulnerability discovered, and initial | ||
fix proposed, by Hamza Avvan. Change `urllib.parse.urlunsplit()` to | ||
sanitize `path` argument in order to avoid confusing the first component of | ||
the path as a net location or scheme. Add `urllib.parse.pathsplit()` function. | ||
fix proposed, by Hamza Avvan. Change :func:`urllib.parse.urlunsplit` to | ||
sanitize ``path`` argument in order to avoid confusing the first component of | ||
the path as a net location or scheme. Add :func:`urllib.parse.pathsplit` | ||
function. | ||
|
||
Co-authored-by: Gregory P. Smith <gps@google.com> | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.