mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 21:17:58 +08:00
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:
committed by
GitHub
parent
9425ca8b7d
commit
ace12e2a12
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user