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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a98348ac85b9eefad773ad2c9a2a27770da73742
|
4
|
+
data.tar.gz: d2f0d7f2017550c21f32945014878ad7f49d8cb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
6
|
-
|
7
|
-
|
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
|
-
|
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
|
data/lib/cookie_crypt/version.rb
CHANGED
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.
|
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:
|
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:
|
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:
|
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
|
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
|