mirror of
https://github.com/minio/minio.git
synced 2025-11-20 18:06:10 -05:00
s3: Fix precondition failed in CopyObjectPart when src is encrypted (#7276)
CopyObject precondition checks into GetObjectReader in order to perform SSE-C pre-condition checks using the last 32 bytes of encrypted ETag rather than the decrypted ETag This also necessitates moving precondition checks for gateways to gateway layer rather than object handler check
This commit is contained in:
@@ -383,3 +383,15 @@ func isErrObjectNotFound(err error) bool {
|
||||
_, ok := err.(ObjectNotFound)
|
||||
return ok
|
||||
}
|
||||
|
||||
// PreConditionFailed - Check if copy precondition failed
|
||||
type PreConditionFailed struct{}
|
||||
|
||||
func (e PreConditionFailed) Error() string {
|
||||
return "At least one of the pre-conditions you specified did not hold"
|
||||
}
|
||||
|
||||
func isErrPreconditionFailed(err error) bool {
|
||||
_, ok := err.(PreConditionFailed)
|
||||
return ok
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user