Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion opencanary/modules/httpproxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def logAuth(self):
atype, token = auth_arr
if atype == "Basic":
try:
username, password = b64decode(token).split(":")
username, password = b64decode(token).decode("utf-8").split(":", 1)
except: # noqa: E722
pass
elif atype == "NTLM":
Expand Down
2 changes: 2 additions & 0 deletions opencanary/test/test_httpproxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,5 @@ def test_httpproxy_auth_attempt_is_logged():
assert log["logtype"] == LoggerBase.LOG_HTTPPROXY_LOGIN_ATTEMPT
assert "USERNAME" in log["logdata"]
assert "PASSWORD" in log["logdata"]
assert log["logdata"]["USERNAME"] == "test_user"
assert log["logdata"]["PASSWORD"] == "test_pass"