From 7477177e84424ccf92c1c6a8c80da2ffb1a6d3f5 Mon Sep 17 00:00:00 2001 From: Bowe Strickland <bowe@redhat.com> Date: Fri, 26 Oct 2018 23:01:08 +0200 Subject: [PATCH] Update htpasswd.py --- repoze/who/plugins/htpasswd.py | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/repoze/who/plugins/htpasswd.py b/repoze/who/plugins/htpasswd.py index 353e23f..0940c9d 100644 --- a/repoze/who/plugins/htpasswd.py +++ b/repoze/who/plugins/htpasswd.py @@ -101,6 +101,8 @@ from base64 import standard_b64encode from repoze.who._compat import must_encode encrypted_string = standard_b64encode(sha1(must_encode(password)).digest()) + if hasattr(encrypted_string, "decode"): + encrypted_string = encrypted_string.decode() return _same_string(hashed, "%s%s" % ("{SHA}", encrypted_string)) def plain_check(password, hashed): -- Gitblit v1.9.3