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

Don't parse challenge's scopes, put them first #1312

Merged
merged 1 commit into from
Mar 2, 2022

Conversation

jonjohnsonjr
Copy link
Collaborator

This is an attempt to work around some interesting behavior from
DockerHub.

This query parameter should be specified multiple times if there is
more than one scope entry from the WWW-Authenticate header.

https://docs.docker.com/registry/spec/auth/token/#requesting-a-token

It would stand to reason that we shouldn't specify scope multiple times
if there is only one (space-separated) scope in the header.

This is an attempt to work around some interesting behavior from
DockerHub.

> This query parameter should be specified multiple times if there is
> more than one scope entry from the WWW-Authenticate header.

https://docs.docker.com/registry/spec/auth/token/#requesting-a-token

It would stand to reason that we shouldn't specify scope multiple times
if there is only one (space-separated) scope in the header.
@codecov-commenter
Copy link

Codecov Report

Merging #1312 (71b022f) into main (bfe2ffc) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 71b022f differs from pull request most recent head 83cdb7b. Consider uploading reports for the commit 83cdb7b to get more accurate results

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1312   +/-   ##
=======================================
  Coverage   74.07%   74.07%           
=======================================
  Files         112      112           
  Lines        8386     8387    +1     
=======================================
+ Hits         6212     6213    +1     
  Misses       1570     1570           
  Partials      604      604           
Impacted Files Coverage Δ
pkg/v1/remote/transport/bearer.go 78.10% <100.00%> (+0.10%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bfe2ffc...83cdb7b. Read the comment docs.

@jonjohnsonjr jonjohnsonjr marked this pull request as ready for review March 2, 2022 18:28
@jonjohnsonjr jonjohnsonjr merged commit 3295637 into google:main Mar 2, 2022
@jonjohnsonjr jonjohnsonjr deleted the stupid-scopey-flanders branch March 2, 2022 18:30
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.

None yet

3 participants