diff options
author | clsr <clsr@clsr.net> | 2016-06-17 18:18:12 +0200 |
---|---|---|
committer | clsr <clsr@clsr.net> | 2016-06-17 18:18:12 +0200 |
commit | 5a57899bb23302c0fc764f75306e09370803aee6 (patch) | |
tree | c9254ec2cd0a99a3fed32616c85b057c5182640d /main.go | |
parent | 66767ded4f006ba7b4dde16fdaf204332b1d4490 (diff) | |
download | gomf-5a57899bb23302c0fc764f75306e09370803aee6.tar.gz gomf-5a57899bb23302c0fc764f75306e09370803aee6.zip |
Add --whitelistv0.2.0
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -70,6 +70,7 @@ func main() { maxSize := flag.Int64("max-size", 50*1024*1024, "max filesize in bytes") filterMime := flag.String("filter-mime", "application/x-dosexec,application/x-msdos-program", "comma-separated list of filtered MIME types") filterExt := flag.String("filter-ext", "exe,dll,msi,scr,com,pif", "comma-separated list of filtered file extensions") + whitelist := flag.Bool("whitelist", false, "use filter as a whitelist instead of blacklist") grill := flag.Bool("grill", false, "enable grills") idLength := flag.Int("id-length", 6, "length of uploaded file IDs") idCharset := flag.String("id-charset", "", "charset for uploaded file IDs (default lowercase letters a-z)") @@ -83,6 +84,7 @@ func main() { storage = NewStorage("upload", *maxSize) storage.FilterExt = strings.Split(*filterExt, ",") storage.FilterMime = strings.Split(*filterMime, ",") + storage.Whitelist = *whitelist storage.IdLength = *idLength if *idCharset != "" { storage.IdCharset = *idCharset |