diff options
author | Yehuda Sadeh <yehuda@inktank.com> | 2013-06-06 13:44:47 -0700 |
---|---|---|
committer | Yehuda Sadeh <yehuda@inktank.com> | 2013-06-10 14:28:03 -0700 |
commit | 6f6e425d1282fc83de68d4251361bda21e52a061 (patch) | |
tree | 82e5886dc976af57a46c4d6af4cfa10a283ee093 | |
parent | 4849c8c1f2dcf386117d3e3ae5d87da256bc2277 (diff) | |
download | ceph-6f6e425d1282fc83de68d4251361bda21e52a061.tar.gz |
rgw: fix json decoding for swift keys
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
-rw-r--r-- | src/rgw/rgw_json_enc.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/rgw/rgw_json_enc.cc b/src/rgw/rgw_json_enc.cc index fa155043fd1..7b807a3e3bb 100644 --- a/src/rgw/rgw_json_enc.cc +++ b/src/rgw/rgw_json_enc.cc @@ -238,11 +238,10 @@ void RGWAccessKey::decode_json(JSONObj *obj, bool swift) { } if (!JSONDecoder::decode_json("subuser", subuser, obj)) { - string user; - JSONDecoder::decode_json("user", user, obj, true); - int pos = user.find(':'); + JSONDecoder::decode_json("user", id, obj, true); + int pos = id.find(':'); if (pos >= 0) { - subuser = user.substr(pos + 1); + subuser = id.substr(pos + 1); } } JSONDecoder::decode_json("secret_key", key, obj, true); |