sftp: limit max file list

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino 2024-06-17 19:24:03 +02:00
parent e0c1b974c9
commit 8bc08b25dc
No known key found for this signature in database
GPG key ID: 935D2952DEC4EECF

View file

@ -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