From: Bingyin Zhang Date: Tue, 26 Dec 2017 09:06:44 +0000 (+0800) Subject: rgw: put bucket policy panics RGW process X-Git-Tag: v13.0.2~623^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f05a044cad18c16ebc2c9a177f38b4bdc76cfd66;p=ceph.git rgw: put bucket policy panics RGW process Fixes: http://tracker.ceph.com/issues/22541 Signed-off-by: Bingyin Zhang --- diff --git a/src/rgw/rgw_iam_policy.cc b/src/rgw/rgw_iam_policy.cc index 62ba3163cb2e..393f2a9e23a6 100644 --- a/src/rgw/rgw_iam_policy.cc +++ b/src/rgw/rgw_iam_policy.cc @@ -787,7 +787,7 @@ bool ParseState::do_string(CephContext* cct, const char* s, size_t l) { } else if (w->id == TokenID::Sid) { t->sid.emplace(s, l); - } else if ((w->id == TokenID::Effect) && + } else if ((w->id == TokenID::Effect) && k && k->kind == TokenKind::effect_key) { t->effect = static_cast(k->specific); } else if (w->id == TokenID::Principal && s && *s == '*') {