Skip to content

Commit

Permalink
Merge pull request #15997 from pritha-srivastava/wip-rgw-assert-corre…
Browse files Browse the repository at this point in the history
…ction

rgw: Correcting the condition in ceph_assert while parsing an AWS Principal

Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
  • Loading branch information
cbodley committed Jul 7, 2017
2 parents 76df830 + 9450abc commit 4a21de9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rgw/rgw_iam_policy.cc
Expand Up @@ -720,7 +720,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),
Expand Down

0 comments on commit 4a21de9

Please sign in to comment.