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>
(cherry picked from commit 4e1318f)

Conflicts:
	src/rgw/rgw_swift_auth.cc: patched function is in src/rgw/rgw_swift.cc
  • Loading branch information
Werkov committed Jan 31, 2017
1 parent 83af8cd commit 4df8cf3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rgw/rgw_swift.cc
Expand Up @@ -613,8 +613,8 @@ int authenticate_temp_url(RGWRados *store, req_state *s)
* of Swift API entry point removed. */
const size_t pos = g_conf->rgw_swift_url_prefix.find_last_not_of('/') + 1;
vector<string> allowed_paths;
allowed_paths.push_back(s->info.request_uri);
allowed_paths.push_back(s->info.request_uri.substr(pos + 1));
allowed_paths.push_back(s->decoded_uri);
allowed_paths.push_back(s->decoded_uri.substr(pos + 1));

vector<string> allowed_methods;
allowed_methods.push_back(s->info.method);
Expand Down

0 comments on commit 4df8cf3

Please sign in to comment.