mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #12541: Be lenient with quotes around Realm field of HTTP Basic Authentation in urllib2.
G: changed Misc/NEWS
This commit is contained in:
parent
539f239e88
commit
34f3fcc269
3 changed files with 19 additions and 1 deletions
|
@ -794,7 +794,7 @@ class AbstractBasicAuthHandler:
|
|||
# allow for double- and single-quoted realm values
|
||||
# (single quotes are a violation of the RFC, but appear in the wild)
|
||||
rx = re.compile('(?:.*,)*[ \t]*([^ \t]+)[ \t]+'
|
||||
'realm=(["\'])(.*?)\\2', re.I)
|
||||
'realm=(["\']?)([^"\']*)\\2', re.I)
|
||||
|
||||
# XXX could pre-emptively send auth info already accepted (RFC 2617,
|
||||
# end of section 2, and section 1.2 immediately after "credentials"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue