devise-two-factor 4.0.2 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of devise-two-factor might be problematic. Click here for more details.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +5 -0
- data/devise-two-factor.gemspec +1 -1
- data/lib/devise_two_factor/version.rb +1 -1
- data/spec/devise/models/two_factor_authenticatable_spec.rb +19 -3
- data.tar.gz.sig +0 -0
- metadata +12 -12
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb62b67111184c3ac7f38b7d7512d4a3785e57737a8bd2f5fb5399cc04b26632
|
4
|
+
data.tar.gz: 430c248a7ef422ed2c9ccdee4db4591e4b94a0606965cf925bb6224a82da50e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '098e361beaaea9b1737d696b1294210b1f0797ddd6234ccd2d5c98796aff6a6ee5620350fc0d49f4da85176f3ed0bb048f8e9245067bb32bebfce0390162f6e9'
|
7
|
+
data.tar.gz: 2b3fc4ae61bb8d2e74778071e4f15947be05c65844c6d9a60e1dfd8a381391b1af9e215472c78059e7a85f0d072658850b518abd68cbabf769fa0b7f8150701b
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
## Unreleased
|
4
4
|
|
5
|
+
## 4.0.2
|
6
|
+
- Add Rails 7.0 support
|
7
|
+
- Renew signing certificate
|
8
|
+
- Use `after` option of TOTP#verify for additional timestamp verification
|
9
|
+
|
5
10
|
## 4.0.1
|
6
11
|
- Convert CI from Travis CI to Github Actions ([#198](https://github.com/tinfoil/devise-two-factor/pull/198))
|
7
12
|
- Fix ActiveSupport::Testing::TimeHelpers require in shared examples ([#191](https://github.com/tinfoil/devise-two-factor/pull/191))
|
data/devise-two-factor.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
|
|
23
23
|
|
24
24
|
s.add_runtime_dependency 'railties', '< 7.1'
|
25
25
|
s.add_runtime_dependency 'activesupport', '< 7.1'
|
26
|
-
s.add_runtime_dependency 'attr_encrypted', '>= 1.3', '<
|
26
|
+
s.add_runtime_dependency 'attr_encrypted', '>= 1.3', '< 5', '!= 2'
|
27
27
|
s.add_runtime_dependency 'devise', '~> 4.0'
|
28
28
|
s.add_runtime_dependency 'rotp', '~> 6.0'
|
29
29
|
|
@@ -64,15 +64,31 @@ describe ::Devise::Models::TwoFactorAuthenticatable do
|
|
64
64
|
|
65
65
|
describe 'otp_secret options' do
|
66
66
|
it 'should be of the key' do
|
67
|
-
|
67
|
+
if attr_encrypted_is_rails_seven_compatible?
|
68
|
+
expect(subject.attr_encrypted_encrypted_attributes[:otp_secret][:key]).to eq('test-key'*8)
|
69
|
+
else
|
70
|
+
expect(subject.encrypted_attributes[:otp_secret][:key]).to eq('test-key'*8)
|
71
|
+
end
|
68
72
|
end
|
69
73
|
|
70
74
|
it 'should be of the mode' do
|
71
|
-
|
75
|
+
if attr_encrypted_is_rails_seven_compatible?
|
76
|
+
expect(subject.attr_encrypted_encrypted_attributes[:otp_secret][:mode]).to eq(:per_attribute_iv_and_salt)
|
77
|
+
else
|
78
|
+
expect(subject.encrypted_attributes[:otp_secret][:mode]).to eq(:per_attribute_iv_and_salt)
|
79
|
+
end
|
72
80
|
end
|
73
81
|
|
74
82
|
it 'should be of the mode' do
|
75
|
-
|
83
|
+
if attr_encrypted_is_rails_seven_compatible?
|
84
|
+
expect(subject.attr_encrypted_encrypted_attributes[:otp_secret][:algorithm]).to eq('aes-256-cbc')
|
85
|
+
else
|
86
|
+
expect(subject.encrypted_attributes[:otp_secret][:algorithm]).to eq('aes-256-cbc')
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
def attr_encrypted_is_rails_seven_compatible?
|
91
|
+
Gem::Version.new(AttrEncrypted::Version.string) >= Gem::Version.new('4.0.0')
|
76
92
|
end
|
77
93
|
end
|
78
94
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise-two-factor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane Wilton
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain:
|
11
11
|
- |
|
@@ -86,7 +86,7 @@ cert_chain:
|
|
86
86
|
vqIDv6JBG9I16h/HhchntKfM58MI1bNZFBSdZqYOJiL8JIjP8HNIk76Y366ppG29
|
87
87
|
EhBYYg==
|
88
88
|
-----END CERTIFICATE-----
|
89
|
-
date:
|
89
|
+
date: 2023-05-05 00:00:00.000000000 Z
|
90
90
|
dependencies:
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: railties
|
@@ -123,12 +123,12 @@ dependencies:
|
|
123
123
|
- - ">="
|
124
124
|
- !ruby/object:Gem::Version
|
125
125
|
version: '1.3'
|
126
|
-
- - "<"
|
127
|
-
- !ruby/object:Gem::Version
|
128
|
-
version: '4'
|
129
126
|
- - "!="
|
130
127
|
- !ruby/object:Gem::Version
|
131
128
|
version: '2'
|
129
|
+
- - "<"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '5'
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -136,12 +136,12 @@ dependencies:
|
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '1.3'
|
139
|
-
- - "<"
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
version: '4'
|
142
139
|
- - "!="
|
143
140
|
- !ruby/object:Gem::Version
|
144
141
|
version: '2'
|
142
|
+
- - "<"
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '5'
|
145
145
|
- !ruby/object:Gem::Dependency
|
146
146
|
name: devise
|
147
147
|
requirement: !ruby/object:Gem::Requirement
|
@@ -301,7 +301,7 @@ homepage: https://github.com/tinfoil/devise-two-factor
|
|
301
301
|
licenses:
|
302
302
|
- MIT
|
303
303
|
metadata: {}
|
304
|
-
post_install_message:
|
304
|
+
post_install_message:
|
305
305
|
rdoc_options: []
|
306
306
|
require_paths:
|
307
307
|
- lib
|
@@ -316,8 +316,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
316
316
|
- !ruby/object:Gem::Version
|
317
317
|
version: '0'
|
318
318
|
requirements: []
|
319
|
-
rubygems_version: 3.
|
320
|
-
signing_key:
|
319
|
+
rubygems_version: 3.0.3.1
|
320
|
+
signing_key:
|
321
321
|
specification_version: 4
|
322
322
|
summary: Barebones two-factor authentication with Devise
|
323
323
|
test_files:
|
metadata.gz.sig
CHANGED
Binary file
|