limit ip site creation

This commit is contained in:
Kyle Drake 2014-10-22 22:32:02 -07:00
parent 9140f3b929
commit 15c60cb6a8
2 changed files with 9 additions and 1 deletions

2
app.rb
View file

@ -550,7 +550,7 @@ post '/create' do
}.to_json
end
if !black_box_answered || !@site.valid?
if !black_box_answered || !@site.valid? || Site.ip_create_limit?(request.ip)
flash[:error] = 'There was an unknown error, please try again.'
return {result: 'error'}.to_json
end