mirror of
https://github.com/pgsty/minio.git
synced 2026-07-16 00:41:25 +03:00
Fix missing authorization check for PutObjectRetentionHandler (#20929)
This commit is contained in:
@@ -2884,6 +2884,12 @@ func (api objectAPIHandlers) PutObjectRetentionHandler(w http.ResponseWriter, r
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check permissions to perform this object retention operation
|
||||||
|
if s3Err := checkRequestAuthType(ctx, r, policy.PutObjectRetentionAction, bucket, object); s3Err != ErrNone {
|
||||||
|
writeErrorResponse(ctx, w, errorCodes.ToAPIErr(s3Err), r.URL)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
cred, owner, s3Err := validateSignature(getRequestAuthType(r), r)
|
cred, owner, s3Err := validateSignature(getRequestAuthType(r), r)
|
||||||
if s3Err != ErrNone {
|
if s3Err != ErrNone {
|
||||||
writeErrorResponse(ctx, w, errorCodes.ToAPIErr(s3Err), r.URL)
|
writeErrorResponse(ctx, w, errorCodes.ToAPIErr(s3Err), r.URL)
|
||||||
|
|||||||
Reference in New Issue
Block a user