placeholder for spam/phish prevention filtering

This commit is contained in:
Kyle Drake 2014-11-17 23:08:54 -08:00
parent 66fdbab21e
commit f4c7467ea0

View file

@ -50,7 +50,7 @@ class Site < Sequel::Model
IMAGE_REGEX = /jpg|jpeg|png|bmp|gif/
LOSSLESS_IMAGE_REGEX = /png|bmp|gif/
LOSSY_IMAGE_REGEX = /jpg|jpeg/
HTML_REGEX = /htm|html/
HTML_REGEX = /.html$|.htm$/
MAX_COMMENT_SIZE = 420 # Used to be the limit for Facebook.. no comment (PUN NOT INTENDED).
SCREENSHOT_RESOLUTIONS = ['540x405', '210x158', '100x100', '50x50']
@ -534,6 +534,10 @@ class Site < Sequel::Model
save_changes(validate: false)
end
if pathname.extname.match HTML_REGEX
# SPAM and phishing checking code goes here
end
dirname = pathname.dirname.to_s
if !File.exists? dirname