]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
Merge branch 'main' into rgw-dev
authorqiuxinyidian <qiuxinyidian@gmail.com>
Thu, 21 Dec 2023 15:49:54 +0000 (23:49 +0800)
committerGitHub <noreply@github.com>
Thu, 21 Dec 2023 15:49:54 +0000 (23:49 +0800)
Signed-off-by: qiuxinyidian <qiuxinyidian@gmail.com>
1  2 
src/rgw/rgw_common.cc
src/rgw/rgw_common.h
src/rgw/rgw_iam_policy.cc
src/test/rgw/test_rgw_iam_policy.cc

Simple merge
index 6c4ed55db932bb2927089f2dc5576422e234eee6,a0202051057ad0b47c60d94ea73922bb1d93ca4d..2cf3d77f9e48354c7b7b05efc8a1db4862439327
@@@ -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();
index cf56f0f5572887a30be3617d1c8386ec0aa70970,3a118ed78d243ba33fa47363ceb7021fffc75569..76b24034d6149bbb8f031a480f1f4f23ff692d80
@@@ -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) {
Simple merge