mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
htpasswd: ignore comments
This commit is contained in:
parent
73038e518a
commit
f912642c20
2 changed files with 4 additions and 1 deletions
|
@ -216,7 +216,7 @@ class Auth(BaseAuth):
|
|||
with open(self.filename) as f:
|
||||
for line in f:
|
||||
line = line.rstrip("\n")
|
||||
if line.lstrip():
|
||||
if line.lstrip() and not line.lstrip().startswith("#"):
|
||||
try:
|
||||
login, hash_value = line.split(":", maxsplit=1)
|
||||
# Always compare both login and password to avoid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue