]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Use decoded URI when verifying TempURL 13007/head
authorMichal Koutný <mkoutny@suse.com>
Wed, 18 Jan 2017 19:15:29 +0000 (20:15 +0100)
committerMichal Koutný <mkoutny@suse.com>
Fri, 20 Jan 2017 22:28:21 +0000 (23:28 +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>
src/rgw/rgw_swift_auth.cc

index 50fdf8e2ea61ff02babb667a0a2787ab81c61460..8ff4473a6d24582c1ed358475ca92c84020aa438 100644 (file)
@@ -217,7 +217,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)