Commit 8bd1903d authored by Ozzieisaacs's avatar Ozzieisaacs

Fix for #1326 (opds feed user login not working -> download was not possible)

parent 1df82110
...@@ -156,6 +156,9 @@ def load_user_from_auth_header(header_val): ...@@ -156,6 +156,9 @@ def load_user_from_auth_header(header_val):
except (TypeError, UnicodeDecodeError, binascii.Error): except (TypeError, UnicodeDecodeError, binascii.Error):
pass pass
user = _fetch_user_by_name(basic_username) 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): if user and check_password_hash(str(user.password), basic_password):
return user return user
return return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment