瀏覽代碼

sftp: limit max file list

Signed-off-by: Nicola Murino <[email protected]>
Nicola Murino 1 年之前
父節點
當前提交
063e33ad76
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      internal/sftpd/server.go

+ 1 - 1
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