]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: fix marker encoding problem. 15998/head
authorMarcus Watts <mwatts@redhat.com>
Wed, 28 Jun 2017 21:36:08 +0000 (17:36 -0400)
committerMarcus Watts <mwatts@redhat.com>
Thu, 29 Jun 2017 06:26:56 +0000 (02:26 -0400)
commitf1ed74534191c7191e707b7115f06bd7d070816e
treee6ff2c8f733abb921e582b99d97dd36ed212d8e4
parentac3c6c5e435a8d7546dc7249a80d9bd8a6497cae
rgw: fix marker encoding problem.

For object names that contain / and %, it is possible in
some circumstances (at least with boto) for "listobjects"
operations to attempt to fetch additional objects using
'marker=' and a value containing both / and %.  When this
happens, when using AWSv4, radosgw returns a signature
validation error.  It's possible to artifically do this
in boto on any bucket (regardless of content) with
sometihng like s=bucket.get_all_keys(marker='level1/8e%25%25FAH3')
this fails because "recoder" assumes the query string
was already encoded if any value is encoded, and fails
to take into account that the string might be partially
encoded, as in this case.

The fix here is to always decode the value, then always encode.

Fixes: http://tracker.ceph.com/issues/20463
Signed-off-by: Marcus Watts <mwatts@redhat.com>
src/rgw/rgw_auth_s3.cc