mirror of
https://github.com/minio/minio.git
synced 2025-11-24 19:46:16 -05:00
return Access Denied for invalid SSE keys (#6432)
This commit fixes are regression in the server regarding handling SSE requests with wrong SSE-C keys. The server now returns an AWS S3 compatable API error (access denied) in case of the SSE key does not match the secret key used during upload. Fixes #6431
This commit is contained in:
committed by
Harshavardhana
parent
5c13765168
commit
fd8749f42a
@@ -124,7 +124,7 @@ func (key *ObjectKey) Unseal(extKey [32]byte, sealedKey SealedKey, domain, bucke
|
||||
}
|
||||
|
||||
if n, err := sio.Decrypt(&decryptedKey, bytes.NewReader(sealedKey.Key[:]), unsealConfig); n != 32 || err != nil {
|
||||
return err // TODO(aead): upgrade sio to use sio.Error
|
||||
return ErrSecretKeyMismatch
|
||||
}
|
||||
copy(key[:], decryptedKey.Bytes())
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user