Skip to content

Commit ec81d4a

Browse files
authored
Merge pull request ceph#60579 from clwluvw/empty-multidelete
rgw: return MalformedXML for empty objects list in DeleteObjects Reviewed-by: Casey Bodley <[email protected]>
2 parents b7f1f8c + e416427 commit ec81d4a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/rgw/rgw_op.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7356,6 +7356,12 @@ void RGWDeleteMultiObj::execute(optional_yield y)
73567356
return;
73577357
}
73587358

7359+
if (multi_delete->objects.empty()) {
7360+
s->err.message = "Missing required element Object";
7361+
op_ret = -ERR_MALFORMED_XML;
7362+
return;
7363+
}
7364+
73597365
constexpr int DEFAULT_MAX_NUM = 1000;
73607366
int max_num = s->cct->_conf->rgw_delete_multi_obj_max_num;
73617367
if (max_num < 0) {

0 commit comments

Comments
 (0)