protect against bots with timeouts
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
class SupportersController < ApplicationController
|
||||
before_filter :set_form_timestamp, only: :new
|
||||
|
||||
def new
|
||||
@supporter = Supporter.new
|
||||
end
|
||||
|
||||
def create
|
||||
@supporter = Supporter.new supporter_form_params
|
||||
if @supporter.save
|
||||
if !input_to_fast? && @supporter.save
|
||||
redirect_to thanks_path
|
||||
else
|
||||
flash.now[:danger] = t 'shared.actions.failed'
|
||||
flash.now[:danger] = t '.timeout' if input_to_fast?
|
||||
render :new
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user