Bug #10271
Radosgw urlencode
0%
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
Associated revisions
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 <giorgis@acmac.uoc.gr>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
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 <giorgis@acmac.uoc.gr>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
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 <giorgis@acmac.uoc.gr>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit 21e07eb6abacb085f81b65acd706b46af29ffc03)
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 <giorgis@acmac.uoc.gr>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit 5fc7a0be67a03ed63fcc8408f8d71a31a1841076)
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 <giorgis@acmac.uoc.gr>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit 21e07eb6abacb085f81b65acd706b46af29ffc03)
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 <giorgis@acmac.uoc.gr>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(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