Conversation
…kport #873) Core stamps the local replication source URL from its own CORE_URL and jobservice compares the result against its own. A deployment that sets an explicit default port on only one of the two — http://harbor-core versus http://harbor-core:80, which the documented SBOM workaround did — made the raw string compare fail. The secret authorizer was then skipped and the adapter fell back to basic auth with an empty username, so every private project failed replication with 401 while public ones still worked through anonymous pull. Parse both URLs and compare scheme, host and port with :80 and :443 made explicit for http and https. If either side fails to parse, or carries no scheme or host, the exact string compare still decides. Signed-off-by: Prasanth Baskar <prasanth@8gears.com>
|
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 ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|
Preview images for this PR are available in
Verify a preview image: Verify SBOM attestation: |
Clean cherry-pick of #873 to release-2.15.
isLocalHarbor compared the replication adapter URL against CORE_URL byte-for-byte, so a trailing slash or default port in either value made Harbor treat itself as a remote registry. The comparison now normalises both sides before matching. Same commit as main, no adaptation needed.