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 <abhishek@suse.com>
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)));
}
}
}