Project

General

Profile

Bug #10271

Radosgw urlencode

Added by Georgios Dimitrakakis over 9 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
High
Assignee:
Target version:
-
% Done:

0%

Source:
Community (user)
Tags:
Backport:
giant, firefly
Regression:
No
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

When performing a multipart upload using AWS SDK JS v.2.0.29 I can see that the uploadId always starts with "2/" which
is urlencoded as "2%2F"

My belief is that Radosgw cannot correctly decode the "2/" hence it produces as 403 error.

If I try to perform the same multipart upload at an older version ceph version 0.72.2 (a913ded2ff138aefb8cb84d347d72164099cfd60) then I can see the upload ID in the apache log as:

"PUT /test/XXXX.dat?partNumber=25&uploadId=I3yihBFZmHx9CCqtcDjr8d-RhgfX8NW HTTP/1.1" 200 - "-" "aws-sdk-nodejs/2.0.29 linux/v0.10.33"

but when I try the same at ceph version 0.80.7 (6c0127fcb58008793d3c8b62d925bc91963672a3) I get the following:

"PUT /test/XXXX.dat?partNumber=12&uploadId=2%2Ff9UgnHhdK0VCnMlpT-XA8ttia1HjK36 HTTP/1.1" 403 78 "-" "aws-sdk-nodejs/2.0.29 linux/v0.10.33"

Since I didn't want to break anything further I 've decided to use a hexadecimal editor and replace the "2/" part with a "2-" in the radosgw binary.

After performing this change all multipart uploads on v.0.80.7 are working as expected. I am attaching both binaries for reference.

I believe that it is defined here :

rgw_op.cc: upload_id = "2/"; /* v2 upload id */

Could you please verify the bug and fix it properly?

Regards,

George

P.S.: I forgot to mention that my system is running CentOS 6.6

radosgw_original - Original radosgw binary file (2.45 MB) Georgios Dimitrakakis, 12/08/2014 09:45 AM

radosgw_modified - Modified radosgw binary file (2.45 MB) Georgios Dimitrakakis, 12/08/2014 09:45 AM

Associated revisions

Revision 21e07eb6 (diff)
Added by Yehuda Sadeh over 9 years ago

rgw: url decode http query params correctly

Fixes: #10271
Backport: firefly

This got broken by the fix for #8702. Since we now only url_decode if
we're in query, we need to specify that we're in query when decoding
these args.

Reported-by: Georgios Dimitrakakis <>
Signed-off-by: Yehuda Sadeh <>

Revision 5fc7a0be (diff)
Added by Yehuda Sadeh over 9 years ago

rgw: change multipart upload id magic

Fixes: #10271
Backport: firefly, giant

Some clients can't sign requests correctly with the original magic
prefix.

Reported-by: Georgios Dimitrakakis <>
Signed-off-by: Yehuda Sadeh <>

Revision 617002d3 (diff)
Added by Yehuda Sadeh about 9 years ago

rgw: url decode http query params correctly

Fixes: #10271
Backport: firefly

This got broken by the fix for #8702. Since we now only url_decode if
we're in query, we need to specify that we're in query when decoding
these args.

Reported-by: Georgios Dimitrakakis <>
Signed-off-by: Yehuda Sadeh <>
(cherry picked from commit 21e07eb6abacb085f81b65acd706b46af29ffc03)

Revision 24c13d87 (diff)
Added by Yehuda Sadeh about 9 years ago

rgw: change multipart upload id magic

Fixes: #10271
Backport: firefly, giant

Some clients can't sign requests correctly with the original magic
prefix.

Reported-by: Georgios Dimitrakakis <>
Signed-off-by: Yehuda Sadeh <>
(cherry picked from commit 5fc7a0be67a03ed63fcc8408f8d71a31a1841076)

Revision b10c0d51 (diff)
Added by Yehuda Sadeh about 9 years ago

rgw: url decode http query params correctly

Fixes: #10271
Backport: firefly

This got broken by the fix for #8702. Since we now only url_decode if
we're in query, we need to specify that we're in query when decoding
these args.

Reported-by: Georgios Dimitrakakis <>
Signed-off-by: Yehuda Sadeh <>
(cherry picked from commit 21e07eb6abacb085f81b65acd706b46af29ffc03)

Revision 4c8a5ced (diff)
Added by Yehuda Sadeh about 9 years ago

rgw: change multipart upload id magic

Fixes: #10271
Backport: firefly, giant

Some clients can't sign requests correctly with the original magic
prefix.

Reported-by: Georgios Dimitrakakis <>
Signed-off-by: Yehuda Sadeh <>
(cherry picked from commit 5fc7a0be67a03ed63fcc8408f8d71a31a1841076)

History

#1 Updated by Yehuda Sadeh over 9 years ago

  • Project changed from Ceph to rgw
  • Category deleted (22)
  • Assignee set to Yehuda Sadeh
  • Source changed from other to Community (user)

#2 Updated by Yehuda Sadeh about 9 years ago

  • Status changed from New to Fix Under Review

#3 Updated by Yehuda Sadeh about 9 years ago

  • Assignee changed from Yehuda Sadeh to Josh Durgin

#4 Updated by Josh Durgin about 9 years ago

  • Status changed from Fix Under Review to Resolved
  • Assignee changed from Josh Durgin to Yehuda Sadeh
  • Backport set to giant, firefly

#5 Updated by Yehuda Sadeh about 9 years ago

  • Status changed from Resolved to Pending Backport

#6 Updated by Josh Durgin about 9 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF