From dde1303c92b39daa2d760a110f48dc9655e7765f Mon Sep 17 00:00:00 2001 From: Ilsoo Byun Date: Fri, 11 Dec 2020 09:57:49 +0900 Subject: [PATCH] rgw: return error when trying to copy encrypted object without key Fixes: https://tracker.ceph.com/issues/48554 Signed-off-by: Ilsoo Byun --- src/rgw/rgw_op.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index d7b9f11180e..eebd262ccac 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -3670,7 +3670,7 @@ int RGWPutObj::get_data(const off_t fst, const off_t lst, bufferlist& bl) filter = decrypt.get(); } if (op_ret < 0) { - return ret; + return op_ret; } ret = obj->range_to_ofs(obj_size, new_ofs, new_end); -- 2.47.3