]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: sts: add all http args to req_info 33355/head
authoryuliyang <yuliyang@cmss.chinamobile.com>
Wed, 12 Feb 2020 00:44:09 +0000 (19:44 -0500)
committerShyukri Shyukriev <shshyukriev@suse.com>
Sat, 15 Feb 2020 19:07:06 +0000 (21:07 +0200)
fix https://tracker.ceph.com/issues/44090

Signed-off-by: yuliyang <yuliyang@cmss.chinamobile.com>
(cherry picked from commit a205fda90c3d39e2d1e2666c109cade4dff359b6)

src/rgw/rgw_rest_sts.cc

index bd00eeb127a20ea81ec882e4292f0797d24998ba..d3cd575e6e7c0acc632862eeaae1f522fbd9a23b 100644 (file)
@@ -353,15 +353,11 @@ void RGWHandler_REST_STS::rgw_sts_parse_input()
       for (const auto& t : tokens) {
         auto pos = t.find("=");
         if (pos != string::npos) {
-           std::string key = t.substr(0, pos);
-           std::string value = t.substr(pos + 1, t.size() - 1);
-           if (key == "RoleArn" || key == "Policy") {
-            value = url_decode(value);
-           }
-           s->info.args.append(key, value);
-         }
-       }
-    }
+          s->info.args.append(t.substr(0,pos),
+                              url_decode(t.substr(pos+1, t.size() -1)));
+        }
+      }
+    } 
   }
   auto payload_hash = rgw::auth::s3::calc_v4_payload_hash(post_body);
   s->info.args.append("PayloadHash", payload_hash);