diff --git a/CHANGELOG.md b/CHANGELOG.md index ebba834..2c53b24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 ----- diff --git a/lib/rucaptcha/controller_helpers.rb b/lib/rucaptcha/controller_helpers.rb index 0844239..bb00734 100644 --- a/lib/rucaptcha/controller_helpers.rb +++ b/lib/rucaptcha/controller_helpers.rb @@ -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 diff --git a/lib/rucaptcha/version.rb b/lib/rucaptcha/version.rb index 79c1e9f..1de28df 100644 --- a/lib/rucaptcha/version.rb +++ b/lib/rucaptcha/version.rb @@ -1,3 +1,3 @@ module RuCaptcha - VERSION = '0.2.4' + VERSION = '0.2.5' end diff --git a/lib/rucaptcha/view_helpers.rb b/lib/rucaptcha/view_helpers.rb index 0844a8a..18d5568 100644 --- a/lib/rucaptcha/view_helpers.rb +++ b/lib/rucaptcha/view_helpers.rb @@ -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