]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Correcting the condition in ceph_assert while parsing an AWS Principal. 15997/head
authorPritha Srivastava <prsrivas@redhat.com>
Thu, 29 Jun 2017 05:39:18 +0000 (11:09 +0530)
committerPritha Srivastava <prsrivas@redhat.com>
Thu, 29 Jun 2017 05:39:18 +0000 (11:09 +0530)
Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
src/rgw/rgw_iam_policy.cc

index d7556e3655a8f6d83722377f2c239ab48be09ee9..c78ae43fe316d5ebf12ed5f419cd89d901aaf6ff 100644 (file)
@@ -719,7 +719,7 @@ static optional<Principal> parse_principal(CephContext* cct, TokenID t,
                          ECMAScript | optimize);
     smatch match;
     if (regex_match(a->resource, match, rx)) {
-      ceph_assert(match.size() == 2);
+      ceph_assert(match.size() == 3);
 
       if (match[1] == "user") {
        return Principal::user(std::move(a->account),