Skip to content

Commit

Permalink
Merge pull request #17956 from zhangsw/fix-rgw-encry-torrent-bug
Browse files Browse the repository at this point in the history
rgw: Torrents are not supported for objects encrypted using SSE-C
  • Loading branch information
mattbenjamin committed Oct 18, 2017
2 parents 5283449 + 9a8ae66 commit fee8a8e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/rgw/rgw_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fee8a8e

Please sign in to comment.