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

Hide Authorization header value #1127

Merged
merged 10 commits into from
Nov 28, 2023
Merged

Hide Authorization header value #1127

merged 10 commits into from
Nov 28, 2023

Conversation

nkottary
Copy link
Contributor

Edits the show and writeheaders methods to hide the value of Authorization header. This hides the Authorization header value when Request or RequestError objects are shown.

Fix for #1125

src/Messages.jl Outdated Show resolved Hide resolved
src/Messages.jl Outdated Show resolved Hide resolved
src/Messages.jl Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Nov 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f9389ae) 82.69% compared to head (96df725) 82.71%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1127      +/-   ##
==========================================
+ Coverage   82.69%   82.71%   +0.01%     
==========================================
  Files          32       32              
  Lines        3052     3054       +2     
==========================================
+ Hits         2524     2526       +2     
  Misses        528      528              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nkottary nkottary marked this pull request as ready for review November 27, 2023 06:02
nkottary and others added 9 commits November 28, 2023 09:33
Edits the `show` and `writeheaders` methods to hide the value of Authorization header.
This hides the Authorization header when `Request` or `RequestError` objects are `show`n.

Fix for JuliaWeb#1125
Co-authored-by: Sebastian Pfitzner <[email protected]>
Co-authored-by: Sebastian Pfitzner <[email protected]>
Copy link
Member

@fredrikekre fredrikekre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some tests for case insensitivity, combined into one regex, and added masking also for Proxy-Authorization.

@fredrikekre fredrikekre merged commit 57d57a5 into JuliaWeb:master Nov 28, 2023
10 checks passed
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

Successfully merging this pull request may close these issues.

4 participants