From 4e1318f4dcbfd64c3ec94f4addf6e38ddd6c013a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Koutn=C3=BD?= Date: Wed, 18 Jan 2017 20:15:29 +0100 Subject: [PATCH] rgw: Use decoded URI when verifying TempURL MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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ý --- src/rgw/rgw_swift_auth.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_swift_auth.cc b/src/rgw/rgw_swift_auth.cc index 50fdf8e2ea61f..8ff4473a6d245 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) -- 2.39.5