From: Michal Koutný Date: Wed, 18 Jan 2017 19:15:29 +0000 (+0100) Subject: rgw: Use decoded URI when verifying TempURL X-Git-Tag: v11.2.1~167^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bfc058d8f951d7694104433f709fc73940511b0a;p=ceph.git rgw: Use decoded URI when verifying TempURL 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ý (cherry picked from commit 4e1318f4dcbfd64c3ec94f4addf6e38ddd6c013a) --- diff --git a/src/rgw/rgw_swift_auth.cc b/src/rgw/rgw_swift_auth.cc index 80c2f483f773..db0fcb5f0959 100644 --- a/src/rgw/rgw_swift_auth.cc +++ b/src/rgw/rgw_swift_auth.cc @@ -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 allowed_paths = { ref_uri, ref_uri.substr(pos + 1)