1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-04-01 20:34:23 +02:00

Proper arguments check for strip_metadata

This commit is contained in:
DarthSim 2020-09-01 17:55:00 +06:00
parent bc10a053ed
commit a1679e5e09

@ -851,10 +851,12 @@ func applyFilenameOption(po *processingOptions, args []string) error {
} }
func applyStripMetadataOption(po *processingOptions, args []string) error { func applyStripMetadataOption(po *processingOptions, args []string) error {
if len(args[0]) > 0 { if len(args) > 1 {
po.StripMetadata = parseBoolOption(args[0]) return fmt.Errorf("Invalid strip metadata arguments: %v", args)
} }
po.StripMetadata = parseBoolOption(args[0])
return nil return nil
} }