From 2f190fdcb8b548f716e36687b2c3241d3e751ecb Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Fri, 5 Feb 2016 15:59:38 +0100 Subject: [PATCH] rgw: Keystone token parsing should fail on misformed JSONs. Signed-off-by: Radoslaw Zarzynski --- src/rgw/rgw_keystone.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_keystone.cc b/src/rgw/rgw_keystone.cc index 2171d1ec7e91..c8ab2b9b91cd 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; -- 2.47.3