From: Abhishek Lekshmanan Date: Thu, 24 Oct 2019 14:19:01 +0000 (+0200) Subject: rgw: iam: add all http args to req_info X-Git-Tag: v15.1.0~417^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=aaa5decc6d2ec04aab47fd80a2c0ae9a7ed18d3c;p=ceph.git rgw: iam: add all http args to req_info parsing a iam post request arguments were broken after a14353496d1f75a303495f538141a1a54ff28c60 as all the key values weren't in http args anymore. Since the if conditional were specifically to url_decode POST args which are by default url encoded anyway, just add all the key value pairs to the req_info args as these are used later by the respective process requests Fixes: https://tracker.ceph.com/issues/42470 Signed-off-by: Abhishek Lekshmanan --- diff --git a/src/rgw/rgw_rest_iam.cc b/src/rgw/rgw_rest_iam.cc index b884d05b74d8..554f10e8b339 100644 --- a/src/rgw/rgw_rest_iam.cc +++ b/src/rgw/rgw_rest_iam.cc @@ -26,13 +26,8 @@ void RGWHandler_REST_IAM::rgw_iam_parse_input() for (const auto& t : tokens) { auto pos = t.find("="); if (pos != string::npos) { - const auto key = t.substr(0, pos); - if (key == "Action") { - s->info.args.append(key, t.substr(pos + 1, t.size() - 1)); - } else if (key == "AssumeRolePolicyDocument" || key == "Path" || key == "PolicyDocument") { - const auto value = url_decode(t.substr(pos + 1, t.size() - 1)); - s->info.args.append(key, value); - } + s->info.args.append(t.substr(0,pos), + url_decode(t.substr(pos+1, t.size() -1))); } } }