]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Use decoded URI when verifying TempURL 12986/head
authorMichal Koutný <mkoutny@suse.com>
Wed, 18 Jan 2017 19:15:29 +0000 (20:15 +0100)
committerMichal Koutný <mkoutny@suse.com>
Thu, 26 Jan 2017 20:42:16 +0000 (21:42 +0100)
Instead of calliing url_decode directly, we reuse s->decoded_uri that is
initialized in RGWREST::preprocess().

Fixes: http://tracker.ceph.com/issues/18590
Signed-off-by: Michal Koutný <mkoutny@suse.com>
(cherry picked from commit 4e1318f4dcbfd64c3ec94f4addf6e38ddd6c013a)

src/rgw/rgw_swift_auth.cc

index 80c2f483f77337dfcd628bc5087789715369f05c..db0fcb5f09596ef7f90132b816a3de683752d513 100644 (file)
@@ -216,7 +216,7 @@ RGWAuthApplier::aplptr_t RGWTempURLAuthEngine::authenticate() const
 
   /* XXX can we search this ONCE? */
   const size_t pos = g_conf->rgw_swift_url_prefix.find_last_not_of('/') + 1;
-  boost::string_ref ref_uri = s->info.request_uri;
+  boost::string_ref ref_uri = s->decoded_uri;
   const std::array<boost::string_ref, 2> allowed_paths = {
     ref_uri,
     ref_uri.substr(pos + 1)