From b4438d25f7649e7a705fbfba3f2909f88e71a356 Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Wed, 29 Jul 2015 14:00:49 +0200 Subject: [PATCH] Cosmetics in htpasswd --- radicale/auth/htpasswd.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/radicale/auth/htpasswd.py b/radicale/auth/htpasswd.py index d851ad06..c9732999 100644 --- a/radicale/auth/htpasswd.py +++ b/radicale/auth/htpasswd.py @@ -49,6 +49,7 @@ following significantly more secure schemes are parsable by Radicale: - MD5-APR1 (htpasswd -m...) -- htpasswd's default method - BCRYPT (htpasswd -B...) -- Requires htpasswd 2.4.x + """ @@ -111,8 +112,7 @@ def _md5apr1(hash_value, password): _verifuncs = { "ssha": _ssha, "sha1": _sha1, - "plain": _plain -} + "plain": _plain} # Conditionally attempt to import external dependencies. @@ -149,9 +149,12 @@ if ENCRYPTION not in _verifuncs: def is_authenticated(user, password): - """Validate credentials: iterate through htpasswd credential file until - user matches, extract hash (encrypted password) and check hash against - user-given password, using the method specified in the Radicale config. + """Validate credentials. + + Iterate through htpasswd credential file until user matches, extract hash + (encrypted password) and check hash against user-given password, using the + method specified in the Radicale config. + """ with open(FILENAME) as f: for line in f: