Commit 172e7257 authored by Georg Brandl's avatar Georg Brandl

Patch #812285: allow multiple auth schemes in AbstractBasicAuthHandler.

parent cadbbfc8
......@@ -767,11 +767,10 @@ class HTTPPasswordMgrWithDefaultRealm(HTTPPasswordMgr):
class AbstractBasicAuthHandler:
rx = re.compile('[ \t]*([^ \t]+)[ \t]+realm="([^"]*)"', re.I)
# XXX this allows for multiple auth-schemes, but will stupidly pick
# the last one with a realm specified.
# XXX there can actually be multiple auth-schemes in a
# www-authenticate header. should probably be a lot more careful
# in parsing them to extract multiple alternatives
rx = re.compile('(?:.*,)*[ \t]*([^ \t]+)[ \t]+realm="([^"]*)"', re.I)
# XXX could pre-emptively send auth info already accepted (RFC 2617,
# end of section 2, and section 1.2 immediately after "credentials"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment