From: Jesse F. Williamson Date: Wed, 26 Feb 2025 21:51:30 +0000 (-0800) Subject: Restore rgw_policy_s3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cd945b5cf1f79a40ce8883893e61ef5d24b17802;p=ceph.git Restore rgw_policy_s3 Signed-off-by: Jesse F. Williamson --- diff --git a/src/rgw/rgw_policy_s3.cc b/src/rgw/rgw_policy_s3.cc index 2919e392b4e..7b8ad0452cb 100644 --- a/src/rgw/rgw_policy_s3.cc +++ b/src/rgw/rgw_policy_s3.cc @@ -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;