git.samba.org
/
jelmer
/
calypso.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c613ade
)
split htpasswd entries to no more than two parts
author
chrysn
<chrysn@fsfe.org>
Tue, 17 Jan 2012 14:15:58 +0000
(15:15 +0100)
committer
Keith Packard
<keithp@keithp.com>
Tue, 17 Jan 2012 16:30:58 +0000
(08:30 -0800)
this avoids an error that occurs when a ':' occurs inside an unencrypted
(plain) password
calypso/acl/htpasswd.py
patch
|
blob
|
history
diff --git
a/calypso/acl/htpasswd.py
b/calypso/acl/htpasswd.py
index e6fdcbc41c35c124d8bc940d22ca031bca3afec4..ae403683baa2da3957fd1496da845494222cee85 100644
(file)
--- a/
calypso/acl/htpasswd.py
+++ b/
calypso/acl/htpasswd.py
@@
-60,7
+60,7
@@
def has_right(owner, user, password):
print "checking access for user %s" % user
for line in open(FILENAME).readlines():
if line.strip():
- login, hash_value = line.strip().split(":")
+ login, hash_value = line.strip().split(":"
, 1
)
if login == user and (not PERSONAL or user == owner):
return CHECK_PASSWORD(hash_value, password)
return False