Skip to content

Commit 8ba6c2d

Browse files
committed
rgw: RGWAccessKey::decode_json() preserves default value of 'active'
squid added the new "bool active" member that defaults to true, but RGWAccessKey::decode_json() sets it to false when "active" isn't present this is an issue for multisite when a squid zone replicates user metadata from a master zone running reef Fixes: https://tracker.ceph.com/issues/68985 Signed-off-by: Casey Bodley <[email protected]>
1 parent c5eacfc commit 8ba6c2d

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)