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

Authorization header is not masked (regression) #657

Open
alextatarinov opened this issue May 3, 2023 · 0 comments
Open

Authorization header is not masked (regression) #657

alextatarinov opened this issue May 3, 2023 · 0 comments

Comments

@alextatarinov
Copy link

bb4df5b Introduced a regression of #375.
Although request.headers[KEY] lookup is case-insensitive, iterating over .items() yields header keys with the original letter case. The tests pass because they use a lowercased authorization header.
The fix could be as simple as adding k.lower().

for k, v in self.request.headers.items():
if k in sensitive_headers:
v = RequestModelFactory.CLEANSED_SUBSTITUTE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant