From 08c32e875e5cc8c8638f2e9631c098a010c811af Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Fri, 5 Jan 2018 21:01:32 -0800 Subject: [PATCH] Fix login using hashed password --- plexpy/webauth.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plexpy/webauth.py b/plexpy/webauth.py index 65fad494..e1c4617e 100644 --- a/plexpy/webauth.py +++ b/plexpy/webauth.py @@ -96,7 +96,8 @@ def check_credentials(username, password, admin_login='0'): if plexpy.CONFIG.HTTP_HASHED_PASSWORD and \ username == plexpy.CONFIG.HTTP_USERNAME and check_hash(password, plexpy.CONFIG.HTTP_PASSWORD): return True, u'admin' - elif username == plexpy.CONFIG.HTTP_USERNAME and password == plexpy.CONFIG.HTTP_PASSWORD: + elif not plexpy.CONFIG.HTTP_HASHED_PASSWORD and \ + username == plexpy.CONFIG.HTTP_USERNAME and password == plexpy.CONFIG.HTTP_PASSWORD: return True, u'admin' elif not admin_login == '1' and plexpy.CONFIG.ALLOW_GUEST_ACCESS and user_login(username, password): return True, u'guest'