From: Zhang Shaowen Date: Tue, 26 Sep 2017 02:00:59 +0000 (+0800) Subject: rgw: Torrents are not supported for objects encrypted using SSE-C X-Git-Tag: v13.0.1~520^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9a8ae664da54eb74e74a12cc16a52b0df7df70a0;p=ceph.git rgw: Torrents are not supported for objects encrypted using SSE-C Fixes: http://tracker.ceph.com/issues/21720 Signed-off-by: Zhang Shaowen --- diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 39a5dee9b715..96bffba90f0e 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -1640,6 +1640,11 @@ void RGWGetObj::execute() /* start gettorrent */ if (torrent.get_flag()) { + attr_iter = attrs.find(RGW_ATTR_CRYPT_MODE); + if (attr_iter != attrs.end() && attr_iter->second.to_str() == "SSE-C-AES256") { + op_ret = -ERR_INVALID_REQUEST; + goto done_err; + } torrent.init(s, store); op_ret = torrent.get_torrent_file(read_op, total_len, bl, obj); if (op_ret < 0)