Fix session value expires typo;
Captcha input field disable autocomplete, and set field type as for shown correct keyboard on mobile view. version 0.2.5
This commit is contained in:
parent
2c72ef1ad3
commit
0a0f272d9a
|
@ -1,7 +1,8 @@
|
|||
0.2.2
|
||||
0.2.5
|
||||
-----
|
||||
|
||||
- Add `session[:_rucaptcha]` expire time, for protect Rails CookieSession Replay Attack.
|
||||
- Captcha input field disable autocomplete, and set field type as `email` for shown correct keyboard on mobile view.
|
||||
|
||||
0.2.3
|
||||
-----
|
||||
|
|
|
@ -8,7 +8,7 @@ module RuCaptcha
|
|||
|
||||
def generate_rucaptcha
|
||||
session[:_rucaptcha] = RuCaptcha::Captcha.random_chars
|
||||
session[:rucaptcha_at] = Time.now.to_i
|
||||
session[:_rucaptcha_at] = Time.now.to_i
|
||||
|
||||
RuCaptcha::Captcha.create(session[:_rucaptcha])
|
||||
end
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
module RuCaptcha
|
||||
VERSION = '0.2.4'
|
||||
VERSION = '0.2.5'
|
||||
end
|
||||
|
|
|
@ -2,6 +2,8 @@ module RuCaptcha
|
|||
module ViewHelpers
|
||||
def rucaptcha_input_tag(opts = {})
|
||||
opts[:name] = '_rucaptcha'
|
||||
opts[:type] = 'email'
|
||||
opts[:autocomplete] = 'off'
|
||||
tag(:input, opts)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue