diff --git a/src/rgw/rgw_common.cc b/src/rgw/rgw_common.cc index 68fb9a2927860..1a59ba02999f5 100644 --- a/src/rgw/rgw_common.cc +++ b/src/rgw/rgw_common.cc @@ -2994,7 +2994,9 @@ void RGWAccessKey::decode_json(JSONObj *obj) { subuser = user.substr(pos + 1); } } - JSONDecoder::decode_json("active", active, obj); + if (bool tmp = false; JSONDecoder::decode_json("active", tmp, obj)) { + active = tmp; // update only if "active" is present + } JSONDecoder::decode_json("create_date", create_date, obj); }