]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Restore rgw_policy_s3
authorJesse F. Williamson <jfw@ibm.com>
Wed, 26 Feb 2025 21:51:30 +0000 (13:51 -0800)
committerJesse F. Williamson <jfw@ibm.com>
Mon, 17 Mar 2025 17:41:28 +0000 (10:41 -0700)
Signed-off-by: Jesse F. Williamson <jfw@ibm.com>
src/rgw/rgw_policy_s3.cc

index 2919e392b4e8364f4191e620257282fad7934fda..7b8ad0452cbc5618c39b1e4ea74e90a5a0276696 100644 (file)
@@ -248,8 +248,7 @@ int RGWPolicy::from_json(bufferlist& bl, string& err_msg)
 {
   JSONParser parser;
 
-  // JSON coming in for Policies can include the NULL character, which breaks parsing:
-  if (!parser.parse(std::string_view(bl.c_str(), bl.length() - 1))) {
+  if (!parser.parse(bl.c_str(), bl.length())) {
     err_msg = "Malformed JSON";
     dout(0) << "malformed json" << dendl;
     return -EINVAL;