mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-26 16:28:15 +00:00
d60deba9b6
fix(security): add IAM authorization to FTP read/metadata/cwd handlers The FTP frontend's get() (RETR), metadata() (SIZE/MDTM), and cwd() (CWD) handlers dispatched directly to the storage backend without calling authorize_operation(). This allowed any authenticated FTP user, including those with explicit Deny policies, to read arbitrary objects and probe bucket existence regardless of IAM policy. Add authorize_operation() calls matching the pattern used by the write-path handlers (put, del, list, rmd) and the WebDAV driver: - get(): S3Action::GetObject - metadata() for files: S3Action::HeadObject - metadata() for directories: S3Action::HeadBucket - cwd(): S3Action::HeadBucket Fixes: GHSA-3g29-xff2-92vp Co-authored-by: houseme <housemecn@gmail.com>