]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-123599: Match `file:` URL hostname against machine hostname in urllib (#132523)
authorBarney Gale <barney.gale@gmail.com>
Tue, 15 Apr 2025 00:05:06 +0000 (01:05 +0100)
committerGitHub <noreply@github.com>
Tue, 15 Apr 2025 00:05:06 +0000 (01:05 +0100)
commit0879ebc953fa7372a4d99f3f79889093f04cac67
tree81a304084ab72c9c8dd86749e77c4ab17fd5c931
parent102f825c5112cbe6985edc0971822b07bd778135
GH-123599: Match `file:` URL hostname against machine hostname in urllib (#132523)

In `_is_local_authority()`, return early if the authority matches the
machine hostname from `socket.gethostname()`, rather than resolving the
names and matching IP addresses.
Doc/library/urllib.request.rst
Lib/urllib/request.py