From: Michal Koutný Date: Wed, 18 Jan 2017 19:15:29 +0000 (+0100) Subject: rgw: Use decoded URI when verifying TempURL X-Git-Tag: v12.0.0~84^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F13007%2Fhead;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ý --- diff --git a/src/rgw/rgw_swift_auth.cc b/src/rgw/rgw_swift_auth.cc index 50fdf8e2ea61..8ff4473a6d24 100644 --- a/src/rgw/rgw_swift_auth.cc +++ b/src/rgw/rgw_swift_auth.cc @@ -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 allowed_paths = { ref_uri, ref_uri.substr(pos + 1)