New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Jul 7, 2017

Conversation

Projects
None yet
3 participants
@pritha-srivastava
Contributor

pritha-srivastava commented Jun 29, 2017

Signed-off-by: Pritha Srivastava prsrivas@redhat.com

rgw: Correcting the condition in ceph_assert while parsing an AWS Pri…
…ncipal.

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
@@ -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);

This comment has been minimized.

@pritha-srivastava

pritha-srivastava Jun 29, 2017

Contributor

If we have a Principal ARN of the form -> arn:aws:iam::usfolks:user/fred in the Bucket Policy, then match[0] will be the full string, match[1] will be 'user' and match[2] will be 'fred', hence match size will be 3.

This comment has been minimized.

@adamemerson

adamemerson Jun 29, 2017

Contributor

Thank you.

@adamemerson

Laboratory Giraffes Train Monkeys

@@ -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);

This comment has been minimized.

@adamemerson

adamemerson Jun 29, 2017

Contributor

Thank you.

@adamemerson

This comment has been minimized.

Contributor

adamemerson commented Jun 29, 2017

Jenkins, retest this please.

@cbodley cbodley merged commit 4a21de9 into ceph:master Jul 7, 2017

4 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
default Build finished.
Details
make check make check succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment