]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw : check the object size when copy obj 38234/head
authorwangyunqing <wangyunqing@inspur.com>
Mon, 23 Nov 2020 03:19:55 +0000 (11:19 +0800)
committerwangyunqing <wangyunqing@inspur.com>
Fri, 3 Sep 2021 01:50:52 +0000 (09:50 +0800)
Fixes: https://tracker.ceph.com/issues/48322
Signed-off-by: wangyunqing <wangyunqing@inspur.com>
src/rgw/rgw_op.cc

index 64f4fc0e64030ea935fa38b6dd88ce2d2964573a..def5c1dba1ff9bf895fa816d410af7b88c8c7cab 100644 (file)
@@ -5414,6 +5414,10 @@ void RGWCopyObj::execute(optional_yield y)
     obj_size = astate->size;
   
     if (!s->system_request) { // no quota enforcement for system requests
+      if (astate->accounted_size > static_cast<size_t>(s->cct->_conf->rgw_max_put_size)) {
+        op_ret = -ERR_TOO_LARGE;
+        return;
+      }
       // enforce quota against the destination bucket owner
       op_ret = dest_bucket->check_quota(this, user_quota, bucket_quota,
                                      astate->accounted_size, y);