From 8bd1903d988fdecac8008cbfd403edc3df458f0e Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Fri, 24 Apr 2020 18:37:29 +0200 Subject: [PATCH] Fix for #1326 (opds feed user login not working -> download was not possible) --- cps/web.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cps/web.py b/cps/web.py index bfb0ec5d..7be3250d 100644 --- a/cps/web.py +++ b/cps/web.py @@ -156,6 +156,9 @@ def load_user_from_auth_header(header_val): except (TypeError, UnicodeDecodeError, binascii.Error): pass user = _fetch_user_by_name(basic_username) + if config.config_login_type == constants.LOGIN_LDAP and services.ldap: + if services.ldap.bind_user(str(user.password), basic_password) + return user if user and check_password_hash(str(user.password), basic_password): return user return