Detect ?format=jpg/png images

Fixes #112
This commit is contained in:
Zed 2020-01-19 09:01:11 +01:00
parent edb3751181
commit 973ba585c7

View file

@ -4,8 +4,8 @@ import nimcrypto, regex
var hmacKey = "secretkey"
const
badJpgExts = @["1500x500", "jpgn", "jpg:", "jpg_"]
badPngExts = @["pngn", "png:", "png_"]
badJpgExts = @["1500x500", "jpgn", "jpg:", "jpg_", "_jpg"]
badPngExts = @["pngn", "png:", "png_", "_png"]
twitterDomains = @[
"twitter.com",
"twimg.com",