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 encoding for proxy auth token #1799

Merged
merged 1 commit into from
Aug 21, 2024
Merged

Conversation

bdehamer
Copy link
Contributor

@bdehamer bdehamer commented Aug 16, 2024

Fixes: #1798

Applies the correct encoding to the proxy auth token in the HttpClient class.

The token parameter to the ProxyAgent is used literally in the Proxy-Authorization header and needs to be encoded as a proper basic-auth value.

See: https://undici.nodejs.org/#/docs/api/ProxyAgent?id=example-basic-proxy-request-with-authentication

Note: I tried, but couldn't find any reasonable way to write a unit test for this change 😬

Signed-off-by: Brian DeHamer <bdehamer@github.com>
@bdehamer bdehamer marked this pull request as ready for review August 16, 2024 22:30
@bdehamer bdehamer requested a review from a team as a code owner August 16, 2024 22:30
Copy link
Collaborator

@thboop thboop left a comment

Choose a reason for hiding this comment

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

lgtm

@bdehamer bdehamer merged commit 7298ff3 into main Aug 21, 2024
14 checks passed
@bdehamer bdehamer deleted the bdehamer/http-client-proxy-auth branch August 21, 2024 13:42
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.

@actions/http-client proxy auth token not properly encoded
2 participants