Skip to content

Commit 3f36e67

Browse files
authored
Merge pull request ceph#65159 from Suyashd999/fix-check-source-header
rgw: Check if `HTTP_X_AMZ_COPY_SOURCE` header is empty
2 parents 4729c98 + bef59f1 commit 3f36e67

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/rgw/rgw_op.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5753,6 +5753,9 @@ bool RGWCopyObj::parse_copy_location(const std::string_view& url_src,
57535753
params_str = url_src.substr(pos + 1);
57545754
}
57555755

5756+
if (name_str.empty()) {
5757+
return false;
5758+
}
57565759
if (name_str[0] == '/') // trim leading slash
57575760
name_str.remove_prefix(1);
57585761

0 commit comments

Comments
 (0)