Skip to content

Commit 4206ac1

Browse files
committed
embedded otel collector
1 parent 69b27ae commit 4206ac1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

internal/config/types.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,14 @@ func (col *Collector) Validate(allowedDirectories []string) error {
365365
err = errors.Join(err, nginxReceiver.Validate(allowedDirectories))
366366
}
367367

368+
for _, path := range col.AdditionalPaths {
369+
cleanPath := filepath.Clean(path)
370+
pathAllowed := isAllowedDir(cleanPath, allowedDirectories)
371+
if !pathAllowed {
372+
err = errors.Join(err, fmt.Errorf("additional config path %s not in allowed directories", path))
373+
}
374+
}
375+
368376
return err
369377
}
370378

0 commit comments

Comments
 (0)