Staging
v0.5.1
https://github.com/python/cpython
Revision b9e5547f5814962964c4a5bd5cd36a2af8fbf974 authored by Miss Islington (bot) on 22 November 2019, 23:36:38 UTC, committed by GitHub on 22 November 2019, 23:36:38 UTC

* 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]]:
>      qop-options       = "qop" "=" <"> 1GH-qop-value <">
>      qop-value         = "auth" | "auth-int" | token
> **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 <brandtbucher@gmail.com>
(cherry picked from commit 14a89c47983f2fb9e7fdf33c769e622eefd3a14a)

Co-authored-by: PypeBros <PypeBros@users.noreply.github.com>
1 parent ca5fafc
History
Tip revision: b9e5547f5814962964c4a5bd5cd36a2af8fbf974 authored by Miss Islington (bot) on 22 November 2019, 23:36:38 UTC
bpo-38686: fix HTTP Digest handling in request.py (GH-17045)
Tip revision: b9e5547
File Mode Size
bdist_wininst
clinic
icons
layout
WinMain.c -rw-r--r-- 449 bytes
_msi.c -rw-r--r-- 32.6 KB
_testconsole.c -rw-r--r-- 3.3 KB
classicAppCompat.can.xml -rw-r--r-- 3.9 KB
classicAppCompat.cat -rw-r--r-- 10.7 KB
classicAppCompat.sccd -rw-r--r-- 18.1 KB
config.c -rw-r--r-- 5.5 KB
crtlicense.txt -rw-r--r-- 1.7 KB
dl_nt.c -rw-r--r-- 4.6 KB
empty.c -rw-r--r-- 137 bytes
errmap.h -rw-r--r-- 4.9 KB
errmap.mak -rw-r--r-- 95 bytes
frozen_dllmain.c -rw-r--r-- 3.9 KB
getpathp.c -rw-r--r-- 35.2 KB
invalid_parameter_handler.c -rw-r--r-- 549 bytes
launcher.c -rw-r--r-- 63.7 KB
msvcrtmodule.c -rw-r--r-- 15.3 KB
pyconfig.h -rw-r--r-- 19.8 KB
pylauncher.rc -rw-r--r-- 1.5 KB
pyshellext.cpp -rw-r--r-- 18.3 KB
pyshellext.def -rw-r--r-- 141 bytes
pyshellext.idl -rw-r--r-- 277 bytes
pyshellext.rc -rw-r--r-- 1.1 KB
pyshellext_d.def -rw-r--r-- 143 bytes
python.manifest -rw-r--r-- 1.3 KB
python3.def -rw-r--r-- 40.6 KB
python3dll.c -rw-r--r-- 134 bytes
python_exe.rc -rw-r--r-- 1.2 KB
python_nt.rc -rw-r--r-- 1.2 KB
python_uwp.cpp -rw-r--r-- 6.5 KB
python_ver_rc.h -rw-r--r-- 970 bytes
pythonw_exe.rc -rw-r--r-- 1.2 KB
readme.txt -rw-r--r-- 3.5 KB
sqlite3.rc -rw-r--r-- 1.3 KB
store_info.txt -rw-r--r-- 5.6 KB
testpy.py -rw-r--r-- 831 bytes
validate_ucrtbase.py -rw-r--r-- 2.7 KB
winreg.c -rw-r--r-- 60.4 KB
winsound.c -rw-r--r-- 6.5 KB

readme.txt

back to top