Skip to content

Commit 9a50cc0

Browse files
authored
Merge pull request ceph#60775 from cbodley/wip-rgw-access-key-active-json
rgw: RGWAccessKey::decode_json() preserves default value of 'active' Reviewed-by: Shilpa Jagannath <[email protected]>
2 parents c06a9b5 + 8ba6c2d commit 9a50cc0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/rgw/rgw_common.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2994,7 +2994,9 @@ void RGWAccessKey::decode_json(JSONObj *obj) {
29942994
subuser = user.substr(pos + 1);
29952995
}
29962996
}
2997-
JSONDecoder::decode_json("active", active, obj);
2997+
if (bool tmp = false; JSONDecoder::decode_json("active", tmp, obj)) {
2998+
active = tmp; // update only if "active" is present
2999+
}
29983000
JSONDecoder::decode_json("create_date", create_date, obj);
29993001
}
30003002

0 commit comments

Comments
 (0)