fix: don't skip "latest" tag authz check for update (#3847)

Reported by @1seal

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
This commit is contained in:
Ramkumar Chinchani
2026-03-07 23:42:53 -08:00
committed by GitHub
parent 9425ca8b7d
commit ace12e2a12
2 changed files with 176 additions and 1 deletions
+1 -1
View File
@@ -349,7 +349,7 @@ func DistSpecAuthzHandler(ctlr *Controller) mux.MiddlewareFunc {
is := ctlr.StoreController.GetImageStore(resource)
tags, err := is.GetImageTags(resource)
if err == nil && slices.Contains(tags, reference) && reference != "latest" {
if err == nil && slices.Contains(tags, reference) {
// if repo exists and request's tag exists then action is UPDATE
action = constants.UpdatePermission
}