cookie_crypt 1.2.3 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d3be15c191ca61484ba3e834a367d21b3d720535
4
- data.tar.gz: 87b153bb15c49ee7294df2cd4ba7285d0a9b7dd9
3
+ metadata.gz: a98348ac85b9eefad773ad2c9a2a27770da73742
4
+ data.tar.gz: d2f0d7f2017550c21f32945014878ad7f49d8cb1
5
5
  SHA512:
6
- metadata.gz: f5ceb826112e77856cd5fa0ec6648519c6bc753d7081769dd6993b9c4350dd85bded9bb9d9c0041f24f76f9e7c4cc7b3a328594716ca06575887de9c5234618a
7
- data.tar.gz: 93b8bd2f85a541bedb753c51f985769dc4363c5dcb4908a29db3e3aaac4cabd6f7779c229bbef9442d5810cec3c9f11a0b052294872721ad5f4fded160425bec
6
+ metadata.gz: d08cf8c8aada6fe450a528b9cedb4192aa45175647b24cc94ab36da7ed1bed5f36c9a4b128bfebb5079db126f0a6214c0bc2010fcd677b7f4b73527b56cb9fc9
7
+ data.tar.gz: 7042321efc5c2ba80a3f5a57983d2e795218ae825d4a76929d66c0aad3f0bd1e09f6123837564b774536df4c9aafff9d8f3c67d856446f5def1a283edde100b1
@@ -2,9 +2,9 @@ include ActionView::Helpers::SanitizeHelper
2
2
  require "useragent"
3
3
  require "logger"
4
4
  class Devise::CookieCryptController < DeviseController
5
- prepend_before_filter :authenticate_scope!
6
- before_filter :prepare_and_validate, :handle_cookie_crypt
7
- before_filter :set_questions, :if => :show_request
5
+ prepend_before_action :authenticate_scope!
6
+ before_action :prepare_and_validate, :handle_cookie_crypt
7
+ before_action :set_questions, :if => :show_request
8
8
 
9
9
  def show
10
10
  if has_matching_encrypted_cookie?
@@ -57,6 +57,7 @@ class Devise::CookieCryptController < DeviseController
57
57
 
58
58
  authentication_success
59
59
  else #normal login attempts
60
+ puts "TESTING::#{ h }\n#{ resource.cookie_crypt_attempts_count }"
60
61
 
61
62
  if matching_answers?(h)
62
63
  generate_cookie unless params[:do_not_save_cookie]
data/cookie_crypt.gemspec CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
23
23
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
24
24
  s.require_paths = ["lib"]
25
25
 
26
- s.add_runtime_dependency 'rails'
26
+ s.add_runtime_dependency 'rails', '>= 3.1.1'
27
27
  s.add_runtime_dependency 'devise'
28
28
  s.add_runtime_dependency 'useragent'
29
29
 
@@ -12,7 +12,7 @@ module CookieCrypt
12
12
  def authentication_success
13
13
  flash[:notice] = 'Signed in through two-factor authentication successfully.'
14
14
  warden.session(resource_name)[:need_cookie_crypt_auth] = false
15
- sign_in resource_name, resource, :bypass => true
15
+ bypass_sign_in resource
16
16
  resource.update_attribute(:cookie_crypt_attempts_count, 0)
17
17
  redirect_to stored_location_for(resource_name) || :root
18
18
  end
@@ -1,3 +1,3 @@
1
1
  module CookieCrypt
2
- VERSION = "1.2.3"
2
+ VERSION = "1.3.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cookie_crypt
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitrii Golub
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-12-14 00:00:00.000000000 Z
12
+ date: 2016-09-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '0'
20
+ version: 3.1.1
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: '0'
27
+ version: 3.1.1
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: devise
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
127
  version: '0'
128
128
  requirements: []
129
129
  rubyforge_project: cookie_crypt
130
- rubygems_version: 2.1.11
130
+ rubygems_version: 2.5.1
131
131
  signing_key:
132
132
  specification_version: 4
133
133
  summary: Encrypted cookie two factor authentication plugin for devise