Fix bugs in cherrypy auth_digest

This commit is contained in:
Kovid Goyal 2012-04-03 15:39:19 +05:30
parent e278da9219
commit 103854e242

View File

@ -33,7 +33,8 @@ qop_auth = 'auth'
qop_auth_int = 'auth-int'
valid_qops = (qop_auth, qop_auth_int)
valid_algorithms = ('MD5', 'MD5-sess')
valid_algorithms = ('MD5', 'MD5-sess', 'md5', 'md5-sess') # Changed by Kovid to
# add lowercase
def TRACE(msg):
@ -67,7 +68,7 @@ def get_ha1_dict(user_ha1_dict):
argument to digest_auth().
"""
def get_ha1(realm, username):
return user_ha1_dict.get(user)
return user_ha1_dict.get(username) # Changed by Kovid to fix typo
return get_ha1