authentication-zero 2.16.8 → 2.16.10

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
  SHA256:
3
- metadata.gz: 22f85e52857c07004eb56d4fdcad96e6b1bd1f709a6038afff84bb4a8378dce2
4
- data.tar.gz: 6467a490abffb63134b1f217a054559cf34fbab939a15bdcc10e419acecbc78d
3
+ metadata.gz: 65348917c3c30813d335ddaa0ded556499189389735612c8c004a44c6fb7ab5c
4
+ data.tar.gz: dcfff79d0c2ad9098d450923dab94ea849f122c1e31991ce602dec0796d70527
5
5
  SHA512:
6
- metadata.gz: b53657217a8f8b5376f12d37dc3ef56989a4159f25d1f3fe89e3398288a599ac2f4a1be0975ad98fb1798b7d084b7e3a4f05bf302145559488c22b9df22bc153
7
- data.tar.gz: 3622a1349a61da59814b7476d90ef8cf132a50f5624b10b0e3d92da8d1f996785be02b2929728dd79a578692f708af8552b16923202ca72bca81fa6d6875c0a7
6
+ metadata.gz: ba5886da3c24e24eff75f138f38846c1a3867075dbbc1199cbe89c73eb26db21b6286bc705129ee9c6925a00b768fe5d9a09e2cc814b2de733caccdfde7ce963
7
+ data.tar.gz: 5287419cf37c6ee2251414ccf57a544316aea3db54ba06df630f12893c5539154c1a33c5a283a859309050114b39e349dba4e6f367c83b64aa17991ef7a6425c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- authentication-zero (2.16.8)
4
+ authentication-zero (2.16.10)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module AuthenticationZero
2
- VERSION = "2.16.8"
2
+ VERSION = "2.16.10"
3
3
  end
@@ -5,7 +5,7 @@ class ApplicationController < ActionController::API
5
5
  before_action :authenticate
6
6
  <%- if options.lockable? %>
7
7
  def require_lock(wait: 1.hour, attempts: 10)
8
- counter = Kredis.counter("require_lock:#{request.remote_ip}:#{params[:controller]}:#{params[:action]}", expires_in: wait)
8
+ counter = Kredis.counter("require_lock:#{request.remote_ip}:#{controller_path}:#{action_name}", expires_in: wait)
9
9
  counter.increment
10
10
 
11
11
  if counter.value > attempts
@@ -8,12 +8,12 @@ class TwoFactorAuthentication::TotpsController < ApplicationController
8
8
 
9
9
  def create
10
10
  if !@user.authenticate(params[:current_password])
11
- redirect_to two_factor_authentication_totp_path, alert: "The password you entered is incorrect"
11
+ redirect_to new_two_factor_authentication_totp_path, alert: "The password you entered is incorrect"
12
12
  elsif @totp.verify(params[:code], drift_behind: 15)
13
13
  @user.update! otp_secret: params[:secret]
14
14
  redirect_to root_path, notice: "2FA is enabled on your account"
15
15
  else
16
- redirect_to two_factor_authentication_totp_path, alert: "That code didn't work. Please try again"
16
+ redirect_to new_two_factor_authentication_totp_path, alert: "That code didn't work. Please try again"
17
17
  end
18
18
  end
19
19
 
@@ -28,6 +28,6 @@
28
28
  </div>
29
29
 
30
30
  <div>
31
- <%%= form.submit "Verify and active" %>
31
+ <%%= form.submit "Verify and activate" %>
32
32
  </div>
33
33
  <%% end %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authentication-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.16.8
4
+ version: 2.16.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nixon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-03 00:00:00.000000000 Z
11
+ date: 2023-03-26 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: