CopyObject skipped decompression when the source was encrypted,
passing compressed ciphertext to the write side. The compressor
then re-compressed already-compressed data, corrupting the object.
The guard was overly broad. It should have checked whether decrypt
is available rather than skipping decompress for all encrypted
sources.
Signed-off-by: Matthew N. Heler <matthew.heler@hotmail.com>
}
bool src_encrypted = s->src_object->get_attrs().count(RGW_ATTR_CRYPT_MODE);
- if (need_decompress && !src_encrypted) {
+ if (need_decompress) {
obj_size = decompress_info.orig_size;
s->src_object->set_obj_size(obj_size);
static constexpr bool partial_content = false;