Skip to content

fix encoding for proxy auth token#1799

Merged
bdehamer merged 1 commit into
mainfrom
bdehamer/http-client-proxy-auth
Aug 21, 2024
Merged

fix encoding for proxy auth token#1799
bdehamer merged 1 commit into
mainfrom
bdehamer/http-client-proxy-auth

Conversation

@bdehamer

@bdehamer bdehamer commented Aug 16, 2024

Copy link
Copy Markdown
Contributor

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

@thboop thboop left a comment

Copy link
Copy Markdown
Collaborator

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
@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