diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2012-05-15 14:39:17 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2012-05-15 14:39:17 (GMT) |
commit | b26fe2f313143139f7666f125b097d9c92a494ff (patch) | |
tree | 42d106f0aa42551995255ba09bc97286f81cf8e4 /Lib/urllib | |
parent | 0fb41b56ea1415943569ee6dda1c9d1aec952c37 (diff) | |
parent | 34f3fcc269be2ecded57ff3ae336977c5e74c42f (diff) | |
download | cpython-b26fe2f313143139f7666f125b097d9c92a494ff.zip cpython-b26fe2f313143139f7666f125b097d9c92a494ff.tar.gz cpython-b26fe2f313143139f7666f125b097d9c92a494ff.tar.bz2 |
merge from 3.2 - Issue #12541: Be lenient with quotes around Realm field of HTTP Basic Authentation in urllib2.
Diffstat (limited to 'Lib/urllib')
-rw-r--r-- | Lib/urllib/request.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py index a5f0866..6cc78ed 100644 --- a/Lib/urllib/request.py +++ b/Lib/urllib/request.py @@ -895,7 +895,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" |