fix: copyObject encryption from unencrypted object (#10102)

This is a continuation of #10085
This commit is contained in:
Harshavardhana 2020-07-21 12:25:01 -07:00 committed by GitHub
parent ec06089eda
commit eb6bf454f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -805,7 +805,7 @@ func DecryptObjectInfo(info *ObjectInfo, r *http.Request) (encrypted bool, err e
}
encrypted = crypto.IsEncrypted(info.UserDefined)
if !encrypted && crypto.SSEC.IsRequested(headers) {
if !encrypted && crypto.SSEC.IsRequested(headers) && r.Header.Get(xhttp.AmzCopySource) == "" {
return false, errInvalidEncryptionParameters
}