Repository navigation
fix(docker): backport resolved manifest URL update checks to 7.3 - #2857
Conversation
Cherry-pick the Docker update-check redirect fix merged for 7.4.1 onto the 7.3 branch. Update checks authenticate against the registry that issued the challenge instead of the host that redirected, so lscr.io images resolve their digest through ghcr.io, and registry credentials stay inside their redirect boundary. The only deviation from the original changeset is one line that exists only on 7.4 (commit 7ca5d3b, "Add OCI image manifest support in DockerClient"): the manifest Accept header also requests application/vnd.oci.image.manifest.v1+json, without which newer ghcr.io pushes return no manifest. With that line the backported file is identical to the merged 7.4.1 version. Related to DST-411 (cherry picked from commit 88f1212)
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
🔧 PR Test Plugin AvailableA test plugin has been generated for this PR that includes the modified files. Version: 📥 Installation Instructions:Install via Unraid Web UI:
Alternative: Direct Download
|
Related to DST-411.
Summary
Backport the Docker update-check redirect fix from #2786 to WebGUI 7.3.
Why this exists
7.3 carries the pre-fix
getRemoteVersionV2()andgetRegistryAuth()verbatim, so it has both problems that #2786 fixed for 7.4.1. Update checks forlscr.ioimages report "not available" because the Bearer token goes to the host that redirects rather than to the registry that issued the challenge, and curl drops the credential across that hop. The same path can also hand registry credentials to a redirect destination.Resolution
Cherry-pick 88f1212 (the #2786 merge) onto 7.3. The manifest request follows approved HTTPS redirects, takes the authentication challenge from the final response, and requests the digest from the resolved URL. A change of host, scheme, or port selects credentials configured for that destination, HTTP downgrades are rejected, and redirect and retry counts are finite.
Reviewer considerations
application/vnd.oci.image.manifest.v1+json. Newer ghcr.io pushes return no manifest without it, and OS-1127 describes the affectedlscr.ioimages as carrying attestation manifests. With that line,DockerClient.phpon this branch is byte-identical to the merged 7.4.1 version.lscr.iodigest check from a developer machine can succeed without any redirect, so the symptom depends on which registry edge serves the request.Behavior changes
Docker page update checks resolve a digest for
lscr.ioimages instead of reporting "not available". Registries that answer on the same origin, public or private, are unaffected.Verification
php tests/docker_registry_redirect_test.phpon this branch: 31 request scenarios and 5 production credential-reader scenarios pass.php -lon the changed file passes.git diffagainst the merged 7.4.1 blobs is empty for both files.Risk
Low. The change is confined to the Docker update-check path plus the new optional credential-registry argument on
getRegistryAuth(), which preserves existing callers. QA passed the identical upstream change on 7.4 (#2786 carriesQA Passed). The Docker page still needs a 7.3.6 build for appliance QA, which DST-411 tracks asNeeds Build.