Commits

Sylvain Hellegouarch committed b8b11a9

Fix for #788

  • Participants
  • Parent commits eed7b76
  • Branches cherrypy-3.0.x

Comments (0)

Files changed (1)

File cherrypy/lib/httpauth.py

     return response == auth_map["response"]
 
 def _checkBasicResponse (auth_map, password, method='GET', encrypt=None, **kwargs):
-    return encrypt(auth_map["password"]) == password
+    try:
+        return encrypt(auth_map["password"], auth_map["username"]) == password
+    except TypeError:
+        return encrypt(auth_map["password"]) == password
 
 AUTH_RESPONSES = {
     "basic": _checkBasicResponse,