Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix basic auth condition #482

Merged
merged 2 commits into from Jan 10, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Next
Fix basic auth condition
  • Loading branch information
abhinavsingh committed Jan 10, 2021
commit 9b00093288237f5073c403f2c4f62acfdfa8ed46
4 changes: 2 additions & 2 deletions proxy/http/proxy/auth.py
Expand Up @@ -35,8 +35,8 @@ def before_upstream_connection(
raise ProxyAuthenticationFailed()
parts = request.headers[b'proxy-authorization'][1].split()
if len(parts) != 2 \
and parts[0].lower() != b'basic' \
and parts[1] != self.flags.auth_code:
or parts[0].lower() != b'basic' \
or parts[1] != self.flags.auth_code:
raise ProxyAuthenticationFailed()
return request

Expand Down