Skip to content

Commit

Permalink
rgw: Use decoded URI when verifying TempURL
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Werkov committed Jan 20, 2017
1 parent 5db320c commit 4e1318f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rgw/rgw_swift_auth.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4e1318f

Please sign in to comment.