diff options
author | Casey Bodley <cbodley@redhat.com> | 2024-11-19 20:02:02 +0100 |
---|---|---|
committer | Casey Bodley <cbodley@redhat.com> | 2024-11-19 20:02:04 +0100 |
commit | 8ba6c2de830129ec0533652a3cb33391b584006d (patch) | |
tree | e028fbf3dcd63f38bcfda30ca39327cc4d009345 /src | |
parent | Merge pull request #60572 from xxhdx1985126/wip-68787 (diff) | |
download | ceph-8ba6c2de830129ec0533652a3cb33391b584006d.tar.xz ceph-8ba6c2de830129ec0533652a3cb33391b584006d.zip |
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 <cbodley@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/rgw/rgw_common.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rgw/rgw_common.cc b/src/rgw/rgw_common.cc index 68fb9a29278..1a59ba02999 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); } |