Commit 6b326d13 authored by Jan Provaznik's avatar Jan Provaznik

Allow to disable exiftool if env variable is set

This allows more flexible way to enable/disable exiftool
parent 2eb065b2
---
title: Allow to disable exiftool depending on env variable.
merge_request:
author:
type: security
......@@ -6,6 +6,7 @@ import (
"errors"
"fmt"
"io"
"os"
"os/exec"
"regexp"
......@@ -101,6 +102,9 @@ func (c *cleaner) startProcessing(stdin io.Reader) error {
}
func IsExifFile(filename string) bool {
if os.Getenv("SKIP_EXIFTOOL") == "1" {
return false
}
filenameMatch := regexp.MustCompile(`(?i)\.(jpg|jpeg|tiff)$`)
return filenameMatch.MatchString(filename)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment