소스 검색

Use replace instead of lstrip in htpasswd ACL (Thanks Simon!).

Guillaume Ayoub 16 년 전
부모
커밋
a75bb261ed
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      radicale/acl/htpasswd.py

+ 1 - 1
radicale/acl/htpasswd.py

@@ -40,7 +40,7 @@ def _crypt(hash, password):
     return crypt.crypt(password, hash) == hash
 
 def _sha1(hash, password):
-    hash = hash.lstrip("{SHA}").encode("ascii")
+    hash = hash.replace("{SHA}", "").encode("ascii")
     password = password.encode(config.get("encoding", "stock"))
     sha1 = hashlib.sha1()
     sha1.update(password)