<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Lib/urllib/request.py, branch 3.8</title>
<subtitle>Python interpreter</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/urllib/request.py?h=3.8</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/urllib/request.py?h=3.8'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2024-03-19T10:53:52Z</updated>
<entry>
<title>[3.8] gh-115197: Stop resolving host in urllib.request proxy bypass (GH-115210) (GH-116069)</title>
<updated>2024-03-19T10:53:52Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2024-03-19T10:53:52Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=41be376ec195d933c90a771056015a63ca128f59'/>
<id>urn:sha1:41be376ec195d933c90a771056015a63ca128f59</id>
<content type='text'>
Use of a proxy is intended to defer DNS for the hosts to the proxy itself, rather than a potential for information leak of the host doing DNS resolution itself for any reason.  Proxy bypass lists are strictly name based.  Most implementations of proxy support agree.
(cherry picked from commit c43b26d02eaa103756c250e8d36829d388c5f3be)

Co-authored-by: Weii Wang &lt;weii.wang@canonical.com&gt;</content>
</entry>
<entry>
<title>bpo-46756: Fix authorization check in urllib.request (GH-31353) (GH-31572)</title>
<updated>2022-03-02T13:50:32Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2022-03-02T13:50:32Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=1c9701a3de0566c085e03dddc14a8508aaae349e'/>
<id>urn:sha1:1c9701a3de0566c085e03dddc14a8508aaae349e</id>
<content type='text'>
Fix a bug in urllib.request.HTTPPasswordMgr.find_user_password() and
urllib.request.HTTPPasswordMgrWithPriorAuth.is_authenticated() which
allowed to bypass authorization. For example, access to URI "example.org/foobar"
was allowed if the user was authorized for URI "example.org/foo".
(cherry picked from commit e2e72567a1c94c548868f6ee5329363e6036057a)

Co-authored-by: Serhiy Storchaka &lt;storchaka@gmail.com&gt;

Co-authored-by: Serhiy Storchaka &lt;storchaka@gmail.com&gt;</content>
</entry>
<entry>
<title>bpo-43075: Fix ReDoS in urllib AbstractBasicAuthHandler (GH-24391)</title>
<updated>2021-04-07T11:45:05Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2021-04-07T11:45:05Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=e7654b6046090914a8323931ed759a94a5f85d60'/>
<id>urn:sha1:e7654b6046090914a8323931ed759a94a5f85d60</id>
<content type='text'>
Fix Regular Expression Denial of Service (ReDoS) vulnerability in
urllib.request.AbstractBasicAuthHandler. The ReDoS-vulnerable regex
has quadratic worst-case complexity and it allows cause a denial of
service when identifying crafted invalid RFCs. This ReDoS issue is on
the client side and needs remote attackers to control the HTTP server.
(cherry picked from commit 7215d1ae25525c92b026166f9d5cac85fb1defe1)

Co-authored-by: Yeting Li &lt;liyt@ios.ac.cn&gt;</content>
</entry>
<entry>
<title>Allow / character in username,password fields in _PROXY envvars. (GH-23973) (#23992)</title>
<updated>2020-12-29T13:15:14Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2020-12-29T13:15:14Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=741f22df24ca61db38b5a7a2a58b5939b7154a01'/>
<id>urn:sha1:741f22df24ca61db38b5a7a2a58b5939b7154a01</id>
<content type='text'>
(cherry picked from commit 030a713183084594659aefd77b76fe30178e23c8)

Co-authored-by: Senthil Kumaran &lt;senthil@uthcode.com&gt;</content>
</entry>
<entry>
<title>bpo-41471: Ignore invalid prefix lengths in system proxy settings on macOS (GH-22762) (GH-22774)</title>
<updated>2020-10-20T07:17:58Z</updated>
<author>
<name>Miss Skeleton (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2020-10-20T07:17:58Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=e7c5a43984f82ef9634cb0b2b8c4750b2fd431a0'/>
<id>urn:sha1:e7c5a43984f82ef9634cb0b2b8c4750b2fd431a0</id>
<content type='text'>
(cherry picked from commit 93a1ccabdede416425473329b8c718d507c55e29)

Co-authored-by: Ronald Oussoren &lt;ronaldoussoren@mac.com&gt;</content>
</entry>
<entry>
<title>bpo-39503: CVE-2020-8492: Fix AbstractBasicAuthHandler (GH-18284) (GH-19296)</title>
<updated>2020-04-02T10:15:55Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2020-04-02T10:15:55Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=ea9e240aa02372440be8024acb110371f69c9d41'/>
<id>urn:sha1:ea9e240aa02372440be8024acb110371f69c9d41</id>
<content type='text'>
The AbstractBasicAuthHandler class of the urllib.request module uses
an inefficient regular expression which can be exploited by an
attacker to cause a denial of service. Fix the regex to prevent the
catastrophic backtracking. Vulnerability reported by Ben Caller
and Matt Schwager.

AbstractBasicAuthHandler of urllib.request now parses all
WWW-Authenticate HTTP headers and accepts multiple challenges per
header: use the realm of the first Basic challenge.

Co-Authored-By: Serhiy Storchaka &lt;storchaka@gmail.com&gt;
Co-authored-by: Victor Stinner &lt;vstinner@python.org&gt;

(cherry picked from commit 0b297d4ff1c0e4480ad33acae793fbaf4bf015b4)</content>
</entry>
<entry>
<title>bpo-39548: Fix handling of 'WWW-Authenticate' header for Digest Auth (GH-18338)</title>
<updated>2020-02-29T21:05:23Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2020-02-29T21:05:23Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=e4686b79798f7a492dcbaa62cf51f4d07fd5ae78'/>
<id>urn:sha1:e4686b79798f7a492dcbaa62cf51f4d07fd5ae78</id>
<content type='text'>
* bpo-39548: Fix handling of 'WWW-Authenticate' header for Digest authentication

 - The 'qop' value in the 'WWW-Authenticate' header is optional. The
   presence of 'qop' in the header should be checked before its value
   is parsed with 'split'.

Signed-off-by: Stephen Balousek &lt;stephen@balousek.net&gt;

* bpo-39548: Fix handling of 'WWW-Authenticate' header for Digest authentication

 - Add NEWS item

Signed-off-by: Stephen Balousek &lt;stephen@balousek.net&gt;

* Update Misc/NEWS.d/next/Library/2020-02-06-05-33-52.bpo-39548.DF4FFe.rst

Co-Authored-By: Brandt Bucher &lt;brandtbucher@gmail.com&gt;

Co-authored-by: Brandt Bucher &lt;brandtbucher@gmail.com&gt;
(cherry picked from commit 5e260e0fde211829fcb67060cfd602f4b679f802)

Co-authored-by: Stephen Balousek &lt;sbalousek@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>bpo-39057: Fix urllib.request.proxy_bypass_environment(). (GH-17619)</title>
<updated>2020-01-05T12:32:00Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2020-01-05T12:32:00Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=fc84d501b9d77701cbdd485de45e200bf027c0e9'/>
<id>urn:sha1:fc84d501b9d77701cbdd485de45e200bf027c0e9</id>
<content type='text'>
Ignore leading dots and no longer ignore a trailing newline.
(cherry picked from commit 6a265f0d0c0a4b3b8fecf4275d49187a384167f4)

Co-authored-by: Serhiy Storchaka &lt;storchaka@gmail.com&gt;</content>
</entry>
<entry>
<title>bpo-38686: fix HTTP Digest handling in request.py (GH-17045)</title>
<updated>2019-11-22T23:36:38Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2019-11-22T23:36:38Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=b9e5547f5814962964c4a5bd5cd36a2af8fbf974'/>
<id>urn:sha1:b9e5547f5814962964c4a5bd5cd36a2af8fbf974</id>
<content type='text'>
* fix HTTP Digest handling in request.py

There is a bug triggered when server replies to a request with `WWW-Authenticate: Digest` where `qop="auth,auth-int"` rather than mere `qop="auth"`. Having both `auth` and `auth-int` is legitimate according to the `qop-options` rule in §3.2.1 of [[https://www.ietf.org/rfc/rfc2617.txt|RFC 2617]]:
&gt;      qop-options       = "qop" "=" &lt;"&gt; 1GH-qop-value &lt;"&gt;
&gt;      qop-value         = "auth" | "auth-int" | token
&gt; **qop-options**: [...] If present, it is a quoted string **of one or more** tokens indicating the "quality of protection" values supported by the server.  The value `"auth"` indicates authentication; the value `"auth-int"` indicates authentication with integrity protection

This is description confirmed by the definition of the [//n//]`GH-`[//m//]//rule// extended-BNF pattern defined in §2.1 of [[https://www.ietf.org/rfc/rfc2616.txt|RFC 2616]] as 'a comma-separated list of //rule// with at least //n// and at most //m// items'.

When this reply is parsed by `get_authorization`, request.py only tests for identity with `'auth'`, failing to recognize it as one of the supported modes the server announced, and claims that `"qop 'auth,auth-int' is not supported"`.

* 📜🤖 Added by blurb_it.

* bpo-38686 review fix: remember why.

* fix trailing space in Lib/urllib/request.py

Co-Authored-By: Brandt Bucher &lt;brandtbucher@gmail.com&gt;
(cherry picked from commit 14a89c47983f2fb9e7fdf33c769e622eefd3a14a)

Co-authored-by: PypeBros &lt;PypeBros@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>bpo-25068: urllib.request.ProxyHandler now lowercases the dict keys (GH-13489)</title>
<updated>2019-09-13T14:25:51Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2019-09-13T14:25:51Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=590ed09a5b422d59cc1f049c64ac30733545eef0'/>
<id>urn:sha1:590ed09a5b422d59cc1f049c64ac30733545eef0</id>
<content type='text'>
(cherry picked from commit b761e3aed1fbada4572a776f6a0d3c4be491d595)

Co-authored-by: Zackery Spytz &lt;zspytz@gmail.com&gt;</content>
</entry>
</feed>
