mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 18:17:16 +01:00
* sftp: refuse to delete entries under Object Lock or WORM rm and rmdir sent DeleteEntry with no protection check, so an SFTP user could delete versions under legal hold or retention, and filer.conf WORM files, that the S3 API and the filer HTTP API refuse to delete. Check the entry first and pin the delete to the Object Lock state that was checked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * sftp: refuse to rename entries under Object Lock or WORM A rename moved a protected version out of its .versions folder, or replaced a protected target, which the delete check alone does not stop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * sftp: refuse to overwrite or setstat entries under Object Lock or WORM An upload over an existing protected entry replaced its content, and a setstat could truncate it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * sftp: let a rename onto itself succeed for a protected entry The filer treats it as a no-op, so there is nothing to protect. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * sftp: read WORM rules from a filer.conf stored in chunks ReadFilerConf without a master client reads only inline content, so a chunked filer.conf looked empty and WORM went unenforced. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * sftp: pin setstat to the Object Lock state it checked The update writes back the entry it read, so a hold set in between would be dropped. The filer now refuses the update instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * sftp: recheck an upload's target when it commits, and refuse directories The upload buffers until Close, so a hold set while it was open still let it overwrite the entry. A PUT to a directory path also lands on a child of that directory, whose protection was never checked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * sftp: refuse to rename a directory that holds protected entries A directory rename moves every descendant, so checking the directory alone let it carry locked versions away from their keys, or WORM files out from under their rule. Refuse when a WORM rule covers the subtree, as the filer does for scoped tokens, or when an object in it is under Object Lock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3_objectlock: scan a literal .versions directory recursively A directory named exactly .versions was listed as flat version files, so a locked object nested below it was missed by the subtree and bucket scans. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>