From 57f082ee2b669ca565d6d95012425bfee8e4f151 Mon Sep 17 00:00:00 2001 From: 0xdx2 Date: Tue, 16 Sep 2025 18:02:24 +0800 Subject: [PATCH] fix: enforce max-keys limit to 1000 in S3 implementation (#549) Co-authored-by: damon --- rustfs/src/storage/ecfs.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/rustfs/src/storage/ecfs.rs b/rustfs/src/storage/ecfs.rs index d13e1cb7..37fd884f 100644 --- a/rustfs/src/storage/ecfs.rs +++ b/rustfs/src/storage/ecfs.rs @@ -1230,6 +1230,7 @@ impl S3 for FS { let prefix = prefix.unwrap_or_default(); let max_keys = match max_keys { Some(v) if v > 0 && v <= 1000 => v, + Some(v) if v > 1000 => 1000, None => 1000, _ => return Err(s3_error!(InvalidArgument, "max-keys must be between 1 and 1000")), };