-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
urllib.request.url2pathname() mishandles a UNC URI variant #127078
Comments
barneygale
added
type-bug
An unexpected behavior, bug, or error
3.12
bugs and security fixes
3.13
bugs and security fixes
3.14
new features, bugs and security fixes
stdlib
Python modules in the Lib dir
labels
Nov 20, 2024
I think we should wait for #126367 to be fixed before tackling this bug |
On second thought, it's better to solve this issue first to avoid backport conflicts. |
barneygale
added a commit
to barneygale/cpython
that referenced
this issue
Nov 22, 2024
…e in URL path Decode a file URI like `file://///server/share` as a UNC path like `\\server\share`. This form of file URI is created by software the simply prepends `file:///` to any absolute Windows path.
barneygale
added a commit
that referenced
this issue
Nov 22, 2024
…RL path (#127132) Decode a file URI like `file://///server/share` as a UNC path like `\\server\share`. This form of file URI is created by software the simply prepends `file:///` to any absolute Windows path.
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Nov 22, 2024
…e in URL path (pythonGH-127132) Decode a file URI like `file://///server/share` as a UNC path like `\\server\share`. This form of file URI is created by software the simply prepends `file:///` to any absolute Windows path. (cherry picked from commit 8c98ed8) Co-authored-by: Barney Gale <[email protected]>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Nov 22, 2024
…e in URL path (pythonGH-127132) Decode a file URI like `file://///server/share` as a UNC path like `\\server\share`. This form of file URI is created by software the simply prepends `file:///` to any absolute Windows path. (cherry picked from commit 8c98ed8) Co-authored-by: Barney Gale <[email protected]>
barneygale
added a commit
that referenced
this issue
Nov 22, 2024
…ve in URL path (GH-127132) (#127135) GH-127078: `url2pathname()`: handle extra slash before UNC drive in URL path (GH-127132) Decode a file URI like `file://///server/share` as a UNC path like `\\server\share`. This form of file URI is created by software the simply prepends `file:///` to any absolute Windows path. (cherry picked from commit 8c98ed8) Co-authored-by: Barney Gale <[email protected]>
barneygale
added a commit
that referenced
this issue
Nov 22, 2024
…ve in URL path (GH-127132) (#127136) GH-127078: `url2pathname()`: handle extra slash before UNC drive in URL path (GH-127132) Decode a file URI like `file://///server/share` as a UNC path like `\\server\share`. This form of file URI is created by software the simply prepends `file:///` to any absolute Windows path. (cherry picked from commit 8c98ed8) Co-authored-by: Barney Gale <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Bug description:
On Windows,
urllib.request.url2pathname()
mishandles an uncommon file URI variant encoding a UNC path. Specifically, a URI with five leading slashes should be converted to a UNC path with two leading slashes, buturl2pathname()
returns a path with three leading slashes. Such URIs are created by software that simply prependsfile:///
to a Windows path. See RFC 8089 E.3.2, final example.CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows
Linked PRs
url2pathname()
: handle extra slash before UNC drive in URL path #127132url2pathname()
: handle extra slash before UNC drive in URL path (GH-127132) #127135url2pathname()
: handle extra slash before UNC drive in URL path (GH-127132) #127136The text was updated successfully, but these errors were encountered: