Merge pull request #31124 from theanalyst/rgw/user-policy-args

rgw: iam: add all http args to req_info

Reviewed-By: Casey Bodley <cbodley@redhat.com>
Reviewed-By: Pritha Srivastava <prsivas@redhat.com>
Reviewed-By: Yuval Lifshitz <yuvalif@yahoo.com>
This commit is contained in:
Abhishek L 2019-12-20 18:12:22 +01:00 committed by GitHub
commit 7933cd191f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)));
}
}
}