mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-11 12:25:53 +02:00
fix: Add a check to prevent attempting to load a directory within patterns (#3326)
This commit is contained in:
parent
3ba71f412e
commit
dd52e137ee
1 changed files with 1 additions and 1 deletions
|
@ -43,7 +43,7 @@ func Init(c map[string]interface{}) (*UnixParserCtx, error) {
|
|||
}
|
||||
r.DataFolder = c["data"].(string)
|
||||
for _, f := range files {
|
||||
if strings.Contains(f.Name(), ".") {
|
||||
if strings.Contains(f.Name(), ".") || f.IsDir() {
|
||||
continue
|
||||
}
|
||||
if err := r.Grok.AddFromFile(filepath.Join(c["patterns"].(string), f.Name())); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue