changeset 4731:512aeb66b980

http auth: do auth_type comparisons case-insensitive
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 11 May 2009 23:10:55 +0200
parents 2a55ba43afb3
children e9a2cbcf5479
files MoinMoin/auth/http.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/auth/http.py	Fri May 08 20:01:57 2009 +0200
+++ b/MoinMoin/auth/http.py	Mon May 11 23:10:55 2009 +0200
@@ -55,10 +55,10 @@
                           auth_method=self.name, auth_attribs=())
         elif not isinstance(request, request_cli.Request):
             env = request.env
-            auth_type = env.get('AUTH_TYPE', '')
-            if auth_type in ['Basic', 'Digest', 'NTLM', 'Negotiate', ]:
+            auth_type = env.get('AUTH_TYPE', '').lower()
+            if auth_type in ['basic', 'digest', 'ntlm', 'negotiate', ]:
                 username = env.get('REMOTE_USER', '').decode(config.charset)
-                if auth_type in ('NTLM', 'Negotiate', ):
+                if auth_type in ('ntlm', 'negotiate', ):
                     # converting to standard case so the user can even enter wrong case
                     # (added since windows does not distinguish between e.g.
                     #  "Mike" and "mike")