summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorS Dellysse <[email protected]>2023-12-08 14:20:00 -0500
committerGitHub <[email protected]>2023-12-08 14:20:00 -0500
commit256ceeb598e918cd26867ab583c8748193b31b88 (patch)
treeb4a2a89d8d9ef96f3921278c410d86b72e44afd9
parent058a00594e676cf8f87f910fec9c300c8ef856d0 (diff)
downloadbazarr-256ceeb598e918cd26867ab583c8748193b31b88.tar.gz
bazarr-256ceeb598e918cd26867ab583c8748193b31b88.zip
Fixed exception being raised when setting all numeric password to access the web UIv1.4.1-beta.4
-rw-r--r--bazarr/app/config.py2
-rw-r--r--bazarr/utilities/helper.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/bazarr/app/config.py b/bazarr/app/config.py
index 70b4b2948..b69963eaa 100644
--- a/bazarr/app/config.py
+++ b/bazarr/app/config.py
@@ -519,7 +519,7 @@ def save_settings(settings_items):
if key == 'settings-auth-password':
if value != settings.auth.password and value is not None:
- value = hashlib.md5(value.encode('utf-8')).hexdigest()
+ value = hashlib.md5(f"{value}".encode('utf-8')).hexdigest()
if key == 'settings-general-debug':
configure_debug = True
diff --git a/bazarr/utilities/helper.py b/bazarr/utilities/helper.py
index fd20f6f3b..b381f2e15 100644
--- a/bazarr/utilities/helper.py
+++ b/bazarr/utilities/helper.py
@@ -14,7 +14,7 @@ def check_credentials(user, pw, request, log_success=True):
ip_addr = request.environ.get('HTTP_X_FORWARDED_FOR', request.remote_addr)
username = settings.auth.username
password = settings.auth.password
- if hashlib.md5(pw.encode('utf-8')).hexdigest() == password and user == username:
+ if hashlib.md5(f"{pw}".encode('utf-8')).hexdigest() == password and user == username:
if log_success:
logging.info(f'Successful authentication from {ip_addr} for user {user}')
return True