mirror of
https://github.com/rustfs/rustfs.git
synced 2026-11-05 02:23:56 +00:00
36ad5a6b87
DeleteObjects ran its Object Lock check on one version of a key and then removed a different one. For an entry without a version id on a key that is not versioning-Enabled, delete_objects_with_accounting judged the key's latest entry and then had the disks remove the null version. When a UUID version or a delete marker sat above a null version under COMPLIANCE retention or legal hold, that retention was never read and a user holding only s3:DeleteObject could remove the retained version. The single-object DELETE on a Suspended key had the same gap. Add SetDisks::check_null_version_object_lock_delete, which looks up the null version under the lock the caller already holds and runs the existing check_object_lock_delete against it when the latest entry carries a UUID version id. The batch path is not gated on source_missing because a delete marker on top makes the latest-version lookup report the key as missing. Plain unversioned keys and versioning-Enabled keys keep a single lookup and unchanged behavior. Refs rustfs/backlog#3017 (ANT-2026-6ED2F7II).