Merge pull request #38234 from inspur-wyq/wip-copy-obj-check-size

rgw : check the object size when copy obj
This commit is contained in:
Daniel Gryniewicz 2022-01-12 09:21:48 -05:00 committed by GitHub
commit be54d5f681
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5450,6 +5450,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);