]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
Check if `HTTP_X_AMZ_COPY_SOURCE` header is empty 66027/head
authorSuyash Dongre <suyashd999@gmail.com>
Wed, 20 Aug 2025 17:52:41 +0000 (23:22 +0530)
committerCasey Bodley <cbodley@redhat.com>
Wed, 22 Oct 2025 12:48:31 +0000 (08:48 -0400)
commit33612238532d6f6b3f50a8ec574de3fca0c00add
treec056797db18d9aa507107ea03a35be14bad88948
parent8cd1b60e1986efff6dcca48b820b30a8f471ef1e
Check if `HTTP_X_AMZ_COPY_SOURCE` header is empty

The issue was that the `HTTP_X_AMZ_COPY_SOURCE` header could be present but empty (i.e., an empty string rather than NULL). The  code only checked if the pointer was not NULL, but didn't verify that the string had content. When an empty string was passed to RGWCopyObj::parse_copy_location(), it would eventually try to access name_str[0] on an empty string, causing a crash.

Fixes: https://tracker.ceph.com/issues/72669
Signed-off-by: Suyash Dongre <suyashd999@gmail.com>
(cherry picked from commit bef59f17293e6e93af025eba1e00646d0b1a2bf0)
src/rgw/rgw_op.cc