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

util/resolver: ignore invalid (empty) scope #5321

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

morpheu
Copy link
Contributor

@morpheu morpheu commented Sep 11, 2024

This PR solves a problem specific for OCI registry.

When starting auth process hitting /v2 route, registry returns an empty scope which leads to a subsequent request as follow:

$ curl -v https://sa-saopaulo-1.ocir.io/v2/ 2>&1 | grep -i www
< WWW-Authenticate: Bearer realm="https://sa-saopaulo-1.ocir.io/20180419/docker/token",service="sa-saopaulo-1.ocir.io",scope=""

And them when hitting url https://sa-saopaulo-1.ocir.io/20180419/docker/token, buildkit try to send a invalid query string scope=::

This PR ignores empty scopes

Signed-off-by: Paulo Sousa <paulo.sousa@corp.globo.com>
@tonistiigi tonistiigi merged commit 1e0f685 into moby:master Sep 12, 2024
91 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants