From: Radoslaw Zarzynski Date: Fri, 5 Feb 2016 14:59:38 +0000 (+0100) Subject: rgw: Keystone token parsing should fail on misformed JSONs. X-Git-Tag: v10.1.0~352^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2f190fdcb8b548f716e36687b2c3241d3e751ecb;p=ceph.git rgw: Keystone token parsing should fail on misformed JSONs. Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/rgw/rgw_keystone.cc b/src/rgw/rgw_keystone.cc index 2171d1ec7e9..c8ab2b9b91c 100644 --- a/src/rgw/rgw_keystone.cc +++ b/src/rgw/rgw_keystone.cc @@ -50,9 +50,9 @@ int KeystoneToken::parse(CephContext *cct, bufferlist& bl) try { if (version == KeystoneApiVersion::VER_2) { - JSONDecoder::decode_json("access", *this, &parser); + JSONDecoder::decode_json("access", *this, &parser, true); } else if (version == KeystoneApiVersion::VER_3) { - JSONDecoder::decode_json("token", *this, &parser); + JSONDecoder::decode_json("token", *this, &parser, true); } } catch (JSONDecoder::err& err) { ldout(cct, 0) << "Keystone token parse error: " << err.message << dendl;