소스 검색

Merge branch 'master' of github.com:Kozea/radicale

Guillaume Ayoub 9 년 전
부모
커밋
656680d998
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      radicale/__init__.py

+ 2 - 2
radicale/__init__.py

@@ -251,8 +251,8 @@ class Application:
         # Ask authentication backend to check rights
         authorization = environ.get("HTTP_AUTHORIZATION", None)
 
-        if authorization:
-            authorization = authorization.lstrip("Basic").strip()
+        if authorization and authorization.startswith("Basic"):
+            authorization = authorization[len("Basic"):].strip()
             user, password = self.decode(base64.b64decode(
                 authorization.encode("ascii")), environ).split(":", 1)
         else: