Skip to content

Commit

Permalink
Fixed logging of proxied client requests while authenticating. #2721
Browse files Browse the repository at this point in the history
  • Loading branch information
morpheus65535 committed Oct 28, 2024
1 parent 23c19db commit ac1a3c5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bazarr/utilities/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@


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:
Expand Down

0 comments on commit ac1a3c5

Please sign in to comment.