mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
rgw: url decode PutUserPolicy params
Since these are sent as a part of a POST request which is usually urlencoded, the json parser would later return invalid json for jsons containing whitespace Fixes: https://tracker.ceph.com/issues/41189 Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
This commit is contained in:
parent
d9a385da8c
commit
fac4ab71fb
@ -90,9 +90,9 @@ uint64_t RGWPutUserPolicy::get_op()
|
||||
|
||||
int RGWPutUserPolicy::get_params()
|
||||
{
|
||||
policy_name = s->info.args.get("PolicyName");
|
||||
user_name = s->info.args.get("UserName");
|
||||
policy = s->info.args.get("PolicyDocument");
|
||||
policy_name = url_decode(s->info.args.get("PolicyName"), true);
|
||||
user_name = url_decode(s->info.args.get("UserName"), true);
|
||||
policy = url_decode(s->info.args.get("PolicyDocument"), true);
|
||||
|
||||
if (policy_name.empty() || user_name.empty() || policy.empty()) {
|
||||
ldout(s->cct, 20) << "ERROR: one of policy name, user name or policy document is empty"
|
||||
|
Loading…
Reference in New Issue
Block a user