Project

General

Profile

Actions

Bug #61670

open

RGW S3 API may not handle urlencoded paths correctly

Added by Martin Zurowietz 11 months ago. Updated 11 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

First off, I'm not sure if this is an issue of RGW or of the AWS SDK for PHP. I've described the issue in more detail in their repo: https://github.com/aws/aws-sdk-php/issues/2704

In short, there is an error with the UploadPartCopy operation if the path contains spaces and is encoded using PHP's urlencode function. The error does not occur if rawurlencode is used. The SDK maintainers said that they could not reproduce the issue (with AWS S3) so it may be specific to RGW S3, which I'm using.

I managed to track the code to the url_decode function (https://github.com/ceph/ceph/blob/4167b5c7978ef83b2ac80581e387b1fa187f056f/src/rgw/rgw_common.cc#L1720). For my untrained C++ eye it looks like it should handle urlencode-d strings (as it does something with "+" to " "). However, I wasn't able to test the function.

The strings I tested with the SDK were something like this: "path/i contain spaces.mp4". With urlencode it becomes "path%2Fi+contain+spaces.mp4" (which fails) and with rawurlencode it becomes "path%2Fi%20contain%20spaces.mp4" (which works).

Can anyone please have a look and tell me if it might be an issue of RGW or if it's the SDK's fault?

Actions #1

Updated by Martin Zurowietz 11 months ago

Moved to the correct project: https://tracker.ceph.com/issues/61697

Actions #2

Updated by Martin Zurowietz 11 months ago

I wanted to close this issue but it seems like I can't, sorry :-(

Actions

Also available in: Atom PDF