mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-29 08:27:06 +00:00
f51b06f0ae
Range GETs on encrypted objects read the whole ciphertext from offset 0 and discarded the decrypted prefix, because the part-boundary seek shipped behind RUSTFS_ENCRYPTED_RANGE_SEEK defaulted to false (backlog#1316 Phase A). Flip the default to true. Safety rests on the marker chain: MPUs created without a candidate layout marker never become seek-eligible, CompleteMultipartUpload promotes the candidate to the quorum marker only after revalidating it against the object's data_dir under the uploadId write lock, and reads seek only when the quorum marker matches the current data_dir. Single-part, compressed and markerless objects keep the full-read path; RUSTFS_ENCRYPTED_RANGE_SEEK=false remains the kill switch. The stale default-off regression test becomes test_legacy_range_seek_defaults_enabled: the unset-env default must match the explicit opt-in plan, seek past the leading parts, and not span the whole ciphertext.