diff options
author | morpheus65535 <[email protected]> | 2024-10-27 22:14:51 -0400 |
---|---|---|
committer | morpheus65535 <[email protected]> | 2024-10-27 22:14:51 -0400 |
commit | ac1a3c5eb07650eb3942163ca3d8f6485a2027b5 (patch) | |
tree | 00d0282fb95feb44f81535f6172af432317c8df1 | |
parent | 23c19db2e2f43c86bea98df80afe5b4b190a82b3 (diff) | |
download | bazarr-1.4.6-beta.14.tar.gz bazarr-1.4.6-beta.14.zip |
Fixed logging of proxied client requests while authenticating. #2721v1.4.6-beta.14
-rw-r--r-- | bazarr/utilities/helper.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bazarr/utilities/helper.py b/bazarr/utilities/helper.py index b381f2e15..e8378bd84 100644 --- a/bazarr/utilities/helper.py +++ b/bazarr/utilities/helper.py @@ -11,7 +11,9 @@ from app.config import settings def check_credentials(user, pw, request, log_success=True): - ip_addr = request.environ.get('HTTP_X_FORWARDED_FOR', request.remote_addr) + forwarded_for_ip_addr = request.environ.get('HTTP_X_FORWARDED_FOR') + real_ip_addr = request.environ.get('HTTP_X_REAL_IP') + ip_addr = forwarded_for_ip_addr or real_ip_addr or request.remote_addr username = settings.auth.username password = settings.auth.password if hashlib.md5(f"{pw}".encode('utf-8')).hexdigest() == password and user == username: |