Delete rucapcha after verify (#23)
This commit is contained in:
parent
e5ff2b9e77
commit
3bf67c0994
|
@ -20,7 +20,7 @@ module RuCaptcha
|
||||||
# Captcha chars in Session expire in 2 minutes
|
# Captcha chars in Session expire in 2 minutes
|
||||||
valid = false
|
valid = false
|
||||||
if (Time.now.to_i - rucaptcha_at) <= RuCaptcha.config.expires_in
|
if (Time.now.to_i - rucaptcha_at) <= RuCaptcha.config.expires_in
|
||||||
valid = captcha.present? && captcha == session[:_rucaptcha]
|
valid = captcha.present? && captcha == session.delete(:_rucaptcha)
|
||||||
end
|
end
|
||||||
|
|
||||||
if resource && resource.respond_to?(:errors)
|
if resource && resource.respond_to?(:errors)
|
||||||
|
|
Loading…
Reference in New Issue