From 8bc08b25dc5d3d23bef735618b9f70d74b8e941c Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Mon, 17 Jun 2024 19:24:03 +0200 Subject: [PATCH] sftp: limit max file list Signed-off-by: Nicola Murino --- internal/sftpd/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/sftpd/server.go b/internal/sftpd/server.go index a5723ca7..d4b255f6 100644 --- a/internal/sftpd/server.go +++ b/internal/sftpd/server.go @@ -329,7 +329,7 @@ func (c *Configuration) Initialize(configDir string) error { logger.Debug(logSender, "", "minimum key size allowed for diffie-ellman-group-exchange: %d", ssh.GetDHKexServerMinBits()) sftp.SetSFTPExtensions(sftpExtensions...) //nolint:errcheck // we configure valid SFTP Extensions so we cannot get an error - sftp.MaxFilelist = vfs.ListerBatchSize + sftp.MaxFilelist = 250 if err := c.configureSecurityOptions(serverConfig); err != nil { return err