Repository navigation
Check scheme and host of request on push redirect - #9294
Merged
Merged
Conversation
|
Skipping CI for Draft Pull Request. |
dmcgowan
marked this pull request as ready for review
October 24, 2023 22:00
dmcgowan
force-pushed
the
push-match-request-scheme
branch
from
October 25, 2023 03:27
baadeec to
6840262
Compare
vvoland
approved these changes
Oct 25, 2023
vvoland
left a comment
Contributor
There was a problem hiding this comment.
LGTM; tested with my reproduction of moby/buildkit#4373 and it solves the issues.
Thanks!
When the HTTP fallback is used, the scheme changes from HTTPS to HTTP which can cause a mismatch on redirect, causing the authorizer to get stripped out. Since the redirect host must match the redirect host in this case, credentials are only sent to the same origin host that returned the redirect. This fixes an issue for a push getting a 401 unauthorized on the PUT request even though credentials are available. Signed-off-by: Derek McGowan <derek@mcg.dev>
dmcgowan
force-pushed
the
push-match-request-scheme
branch
from
October 25, 2023 15:55
6840262 to
466ee87
Compare
samuelkarp
approved these changes
Oct 25, 2023
This was referenced Oct 26, 2023
kiashok
added a commit
to kiashok/containerd
that referenced
this pull request
Oct 23, 2024
Update fork-external main with upstream main @ 452ec25 Related work items: containerd#5890, containerd#7647, containerd#9218, containerd#9233, containerd#9258, containerd#9270, containerd#9274, containerd#9279, containerd#9283, containerd#9286, containerd#9289, containerd#9290, containerd#9294, containerd#9295, containerd#9297, containerd#9305, containerd#9306, containerd#9308, containerd#9316, containerd#9317, containerd#9319, containerd#9320, containerd#9321
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the HTTP fallback is used, the scheme changes from HTTPS to HTTP which can cause a mismatch on redirect, causing the authorizer to get stripped out. Since the redirect host must match the redirect host in this case, credentials are only sent to the same origin host that returned the redirect.
This fixes an issue for a push getting a 401 unauthorized on the PUT request even though credentials are available.
A likely fix for the issue in #9283