1 Commits

Author SHA1 Message Date
shoopea
5c76476bb4 add max limit for searches
Some checks failed
golangci-lint / lint (push) Has been cancelled
Units tests / test (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
2025-12-06 11:01:28 +01:00

2
ftp.go
View File

@@ -1096,7 +1096,7 @@ func (c *ServerConn) Walk(root string) *Walker {
// Search returns all the directories matching the search pattern // Search returns all the directories matching the search pattern
func (c *ServerConn) Search(pattern string) ([]string, error) { func (c *ServerConn) Search(pattern string) ([]string, error) {
_, message, err := c.cmd(StatusCommandOK, "SITE SEARCH %s", pattern) _, message, err := c.cmd(StatusCommandOK, "SITE SEARCH %s --LIMIT 50000", pattern)
if err != nil { if err != nil {
return nil, err return nil, err
} }