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.
|
- 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
|
0.2.3
|
||||||
-----
|
-----
|
||||||
|
|
|
@ -8,7 +8,7 @@ module RuCaptcha
|
||||||
|
|
||||||
def generate_rucaptcha
|
def generate_rucaptcha
|
||||||
session[:_rucaptcha] = RuCaptcha::Captcha.random_chars
|
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])
|
RuCaptcha::Captcha.create(session[:_rucaptcha])
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
module RuCaptcha
|
module RuCaptcha
|
||||||
VERSION = '0.2.4'
|
VERSION = '0.2.5'
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,6 +2,8 @@ module RuCaptcha
|
||||||
module ViewHelpers
|
module ViewHelpers
|
||||||
def rucaptcha_input_tag(opts = {})
|
def rucaptcha_input_tag(opts = {})
|
||||||
opts[:name] = '_rucaptcha'
|
opts[:name] = '_rucaptcha'
|
||||||
|
opts[:type] = 'email'
|
||||||
|
opts[:autocomplete] = 'off'
|
||||||
tag(:input, opts)
|
tag(:input, opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue