minimalist_authentication 2.2.4 → 2.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
  SHA256:
3
- metadata.gz: b86110ca5e209864047e3c499a09401a264019ea2bd4311d3eb11e02ac95c29c
4
- data.tar.gz: '0493e05bb52e0090890c785149bfb237309b2ad6e81988258f5fda308f8bf8bf'
3
+ metadata.gz: bd72c9f17536ef24bfc7d134733d03a00f1c235d5708b01dc2d5f415a484a688
4
+ data.tar.gz: 0501ccbf2663bf59d5a18ebb45566de7e04739b48ebda46ce6f0a5efa5ff0c78
5
5
  SHA512:
6
- metadata.gz: eade9a93179f92c337ed21258d438861fbe70210d1a252dab6998fe10f49d18e0b6ddf250bef8bc6ebae69aa068e44bf00e366d4aeae4e9c4c55775402c21a8f
7
- data.tar.gz: b1fcc6eb5d0dcd5bfcb8e1e740a72faff20c397f8ed9bc216a0eba343cddbd36457e2bf03aa09ec1fee51c6f82f429c97b7dfc6becdf4562b555d744074f5d21
6
+ metadata.gz: a1bb394153abcb693310c2d78a0d75385730accf41296e0871a86f15522a37db365bf09b41f94e092f4ab50be37b26765c0d91f93b88fcee6555d8737c4c38ab
7
+ data.tar.gz: aa4b2745cb630582b9c86a42aead66bd12b3be68d14c64f13d99f8cbbbd50423fc9820ba76bf84093503d84746d7046bb3823e421c3dc9d764f13e130c94f9d2
@@ -15,16 +15,17 @@ class PasswordResetsController < ApplicationController
15
15
  MinimalistAuthenticationMailer.update_password(user).deliver_now
16
16
  end
17
17
  # always display notice even if the user was not found to prevent leaking user emails
18
- redirect_to new_session_path, notice: "Password reset instructions were mailed to #{email_params[:email]}"
18
+ redirect_to new_session_path, notice: "Password reset instructions were mailed to #{email}"
19
19
  end
20
20
 
21
21
  private
22
22
 
23
23
  def user
24
- @user ||= MinimalistAuthentication.configuration.user_model.active.email_verified.find_by(email_params)
24
+ return unless URI::MailTo::EMAIL_REGEXP.match?(email)
25
+ @user ||= MinimalistAuthentication.configuration.user_model.active.email_verified.find_by(email: email)
25
26
  end
26
27
 
27
- def email_params
28
- params.require(:user).permit(:email)
28
+ def email
29
+ params.require(:user).fetch(:email)
29
30
  end
30
31
  end
@@ -1,3 +1,3 @@
1
1
  module MinimalistAuthentication
2
- VERSION = '2.2.4'
2
+ VERSION = '2.3.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minimalist_authentication
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.4
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Baldwin
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-04-21 00:00:00.000000000 Z
12
+ date: 2022-08-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails