Skip to content

fix(docker): backport resolved manifest URL update checks to 7.3 - #2857

Merged
tom mortensen (limetech) merged 1 commit into
7.3from
fix/dst-411-docker-manifest-redirect-73
Nov 18, 2026
Merged

tom mortensen (limetech) merged 1 commit into
7.3from
fix/dst-411-docker-manifest-redirect-73

Conversation

@elibosley

Copy link
Copy Markdown
Member

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() and getRegistryAuth() verbatim, so it has both problems that #2786 fixed for 7.4.1. Update checks for lscr.io images 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

  • One line deviates from the original changeset. 7.3 never received 7ca5d3b ("Add OCI image manifest support in DockerClient", 7.4 only), so the conflict was resolved in favor of the 7.4 Accept header, which also requests application/vnd.oci.image.manifest.v1+json. Newer ghcr.io pushes return no manifest without it, and OS-1127 describes the affected lscr.io images as carrying attestation manifests. With that line, DockerClient.php on this branch is byte-identical to the merged 7.4.1 version.
  • A private image whose registry redirects to another host now uses credentials stored for the destination, and sends none when the destination has none stored. That check already failed before this change, because curl stripped the credential on the cross-host hop.
  • The reproduction lives in OS-1127 and the upstream PR. A public lscr.io digest 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.io images instead of reporting "not available". Registries that answer on the same origin, public or private, are unaffected.

Verification

  • php tests/docker_registry_redirect_test.php on this branch: 31 request scenarios and 5 production credential-reader scenarios pass.
  • php -l on the changed file passes.
  • git diff against the merged 7.4.1 blobs is empty for both files.
  • Branch is based on the current 7.3 tip (ae3f5cc).

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 carries QA Passed). The Docker page still needs a 7.3.6 build for appliance QA, which DST-411 tracks as Needs Build.

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

coderabbitai Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 171b83d6-24cc-4c47-94df-8c5ec59b7d91

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

Copy link
Copy Markdown

🔧 PR Test Plugin Available

A test plugin has been generated for this PR that includes the modified files.

Version: 2026.11.18.2243
Build: View Workflow Run

📥 Installation Instructions:

Install via Unraid Web UI:

  1. Go to Plugins → Install Plugin
  2. Copy and paste this URL:
https://preview.dl.unraid.net/pr-plugins/pr-2857/webgui-pr-2857.plg
  1. Click Install

Alternative: Direct Download

⚠️ Important Notes:

  • Testing only: This plugin is for testing PR changes
  • Backup included: Original files are automatically backed up
  • Easy removal: Files are restored when plugin is removed
  • Conflicts: Remove this plugin before installing production updates
  • Post-merge behavior: This preview stays available after merge until preview storage expires or it is manually cleaned up

📝 Modified Files:

Click to expand file list
emhttp/plugins/dynamix.docker.manager/include/DockerClient.php

🔄 To Remove:

Navigate to Plugins → Installed Plugins and remove webgui-pr-2857, or run:

plugin remove webgui-pr-2857

🤖 This comment is automatically generated and will be updated with each new push to this PR.

@limetech tom mortensen (limetech) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@limetech
tom mortensen (limetech) merged commit b5f7b98 into 7.3 Nov 18, 2026
6 checks passed
@limetech
tom mortensen (limetech) deleted the fix/dst-411-docker-manifest-redirect-73 branch November 18, 2026 22:50
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.

2 participants