Security: Enforce strict validation for FFmpeg binary paths (#214)

This commit is contained in:
Rin
2026-01-08 12:33:50 +07:00
committed by GitHub
parent 6f6c7563a0
commit 14297171be
3 changed files with 60 additions and 5 deletions
+4
View File
@@ -244,6 +244,10 @@ func readMetadataWithFFprobe(filePath string) (*AudioMetadata, error) {
return nil, err
}
if err := ValidateExecutable(ffprobePath); err != nil {
return nil, fmt.Errorf("invalid ffprobe executable: %w", err)
}
// Use ffprobe to get metadata in JSON format (both format and stream tags)
cmd := exec.Command(ffprobePath,
"-v", "quiet",