From: qiuxinyidian Date: Thu, 21 Dec 2023 15:49:54 +0000 (+0800) Subject: Merge branch 'main' into rgw-dev X-Git-Tag: v19.3.0~262^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4e53d3e32e4236cbbe740c48cc6c133699f48a3e;p=ceph-ci.git Merge branch 'main' into rgw-dev Signed-off-by: qiuxinyidian --- 4e53d3e32e4236cbbe740c48cc6c133699f48a3e diff --cc src/rgw/rgw_common.h index 6c4ed55db93,a0202051057..2cf3d77f9e4 --- a/src/rgw/rgw_common.h +++ b/src/rgw/rgw_common.h @@@ -1756,11 -1767,11 +1767,11 @@@ static constexpr uint32_t MATCH_POLICY_ static constexpr uint32_t MATCH_POLICY_ARN = 0x04; static constexpr uint32_t MATCH_POLICY_STRING = 0x08; -extern bool match_policy(std::string_view pattern, std::string_view input, +extern bool match_policy(const std::string& pattern, const std::string& input, uint32_t flag); - extern std::string camelcase_dash_http_attr(const std::string& orig); - extern std::string lowercase_dash_http_attr(const std::string& orig); + extern std::string camelcase_dash_http_attr(const std::string& orig, bool convert2dash = true); + extern std::string lowercase_dash_http_attr(const std::string& orig, bool bidirection = false); void rgw_setup_saved_curl_handles(); void rgw_release_all_curl_handles(); diff --cc src/rgw/rgw_iam_policy.cc index cf56f0f5572,3a118ed78d2..76b24034d61 --- a/src/rgw/rgw_iam_policy.cc +++ b/src/rgw/rgw_iam_policy.cc @@@ -578,8 -584,8 +584,8 @@@ bool ParseState::do_string(CephContext t->action = allValue : t->notaction = allValue); } else { for (auto& p : actpairs) { - if (match_policy({s, l}, p.name, MATCH_POLICY_ACTION)) { + if (match_policy(string(s, l), p.name, MATCH_POLICY_ACTION)) { - is_validaction = true; + is_valid_action = true; (w->id == TokenID::Action ? t->action[p.bit] = 1 : t->notaction[p.bit] = 1); } if ((t->action & s3AllValue) == s3AllValue) {