tentacle: rgw: Check if HTTP_X_AMZ_COPY_SOURCE header is empty#66027
Open
cbodley wants to merge 1 commit intoceph:tentaclefrom
Open
tentacle: rgw: Check if HTTP_X_AMZ_COPY_SOURCE header is empty#66027cbodley wants to merge 1 commit intoceph:tentaclefrom
HTTP_X_AMZ_COPY_SOURCE header is empty#66027cbodley wants to merge 1 commit intoceph:tentaclefrom
Conversation
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 bef59f1)
|
I have a question around this? name_str could be full of whitespaces eg. " " during empty() check? any possibility to do boost::trim() before empty() check? |
yuvalif
approved these changes
Dec 14, 2025
Contributor
|
Removing needs-qa until we have notifiaction/multisite fixes backported to tentacle. |
Contributor
|
jenkins test make check |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
backport tracker: https://tracker.ceph.com/issues/73607
backport of #65159
parent tracker: https://tracker.ceph.com/issues/72669
this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh