clearance 2.7.0 → 2.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -1
- data/Gemfile +1 -1
- data/Gemfile.lock +44 -39
- data/README.md +16 -2
- data/SECURITY.md +16 -0
- data/gemfiles/rails_6.1.gemfile +1 -1
- data/gemfiles/rails_7.0.gemfile +1 -1
- data/gemfiles/rails_7.1.gemfile +1 -1
- data/lib/clearance/configuration.rb +1 -1
- data/lib/clearance/engine.rb +0 -1
- data/lib/clearance/user.rb +1 -1
- data/lib/clearance/version.rb +1 -1
- data/lib/clearance.rb +1 -1
- data/spec/models/user_spec.rb +4 -3
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9ebc10e226aa134b16da93b71b4c3a711c3f83f151446fea8efddcaa6bd732f
|
4
|
+
data.tar.gz: '09513f61deaff3967af0226d46e1ab26239919ed6d6ce4dcfa9883e7d2cc68f2'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27db1cc19f4846fd087600086ea7d00fb99e2730ae63a09047400e1a9239b5cbc31461c48a49a053a06ec88c89e571694d96d377bf7afea05e1bb0910a69b51c
|
7
|
+
data.tar.gz: 5dded1584c8fa0485d60e3eeb7175f45d93b03a1c5afb9644fe3064d09af1c9e5da70eabe11e35e6bd8d31bb8ea9c997ab35537b4b72d3320da4e994250b0119
|
data/CHANGELOG.md
CHANGED
@@ -5,7 +5,22 @@ complete changelog, see the git history for each version via the version links.
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
-
[Unreleased]: https://github.com/thoughtbot/clearance/compare/v2.7.
|
8
|
+
[Unreleased]: https://github.com/thoughtbot/clearance/compare/v2.7.2...main
|
9
|
+
|
10
|
+
## [2.7.2] - June 28, 2024
|
11
|
+
- Fix method redefinition and circular require issues (#1027)
|
12
|
+
- Add specs for email validator strict mode (#1001)
|
13
|
+
- Create SECURITY.md (#972)
|
14
|
+
- Fix validating email in strict mode (#976)
|
15
|
+
- Update the example config in README.md (#977)
|
16
|
+
- Remove Hound README badge (#1020)
|
17
|
+
|
18
|
+
[2.7.2]: https://github.com/thoughtbot/clearance/compare/v2.7.1...v2.7.2
|
19
|
+
|
20
|
+
## [2.7.1] - May 8, 2024
|
21
|
+
- Update sqlite3 and erb_lint gems (#1017) Jos O'shea
|
22
|
+
|
23
|
+
[2.7.1]: https://github.com/thoughtbot/clearance/compare/v2.7.0...v2.7.1
|
9
24
|
|
10
25
|
## [2.7.0] - April 19, 2024
|
11
26
|
- Call dynamic README workflow (#1004)
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
clearance (2.7.
|
4
|
+
clearance (2.7.2)
|
5
5
|
actionmailer (>= 5.0)
|
6
6
|
activemodel (>= 5.0)
|
7
7
|
activerecord (>= 5.0)
|
@@ -64,12 +64,11 @@ GEM
|
|
64
64
|
ffi-compiler (~> 1.0)
|
65
65
|
ast (2.4.2)
|
66
66
|
bcrypt (3.1.20)
|
67
|
-
better_html (1.
|
68
|
-
actionview (>=
|
69
|
-
activesupport (>=
|
67
|
+
better_html (2.1.1)
|
68
|
+
actionview (>= 6.0)
|
69
|
+
activesupport (>= 6.0)
|
70
70
|
ast (~> 2.0)
|
71
71
|
erubi (~> 1.4)
|
72
|
-
html_tokenizer (~> 0.0.6)
|
73
72
|
parser (>= 2.4)
|
74
73
|
smart_properties
|
75
74
|
builder (3.2.4)
|
@@ -83,7 +82,7 @@ GEM
|
|
83
82
|
regexp_parser (>= 1.5, < 3.0)
|
84
83
|
xpath (~> 3.2)
|
85
84
|
coderay (1.1.3)
|
86
|
-
concurrent-ruby (1.
|
85
|
+
concurrent-ruby (1.2.3)
|
87
86
|
crass (1.0.6)
|
88
87
|
database_cleaner (2.0.1)
|
89
88
|
database_cleaner-active_record (~> 2.0.0)
|
@@ -95,15 +94,14 @@ GEM
|
|
95
94
|
diff-lcs (1.5.0)
|
96
95
|
email_validator (2.2.4)
|
97
96
|
activemodel
|
98
|
-
erb_lint (0.
|
97
|
+
erb_lint (0.5.0)
|
99
98
|
activesupport
|
100
|
-
better_html (
|
101
|
-
html_tokenizer
|
99
|
+
better_html (>= 2.0.1)
|
102
100
|
parser (>= 2.7.1.4)
|
103
101
|
rainbow
|
104
102
|
rubocop
|
105
103
|
smart_properties
|
106
|
-
erubi (1.
|
104
|
+
erubi (1.12.0)
|
107
105
|
factory_bot (6.2.1)
|
108
106
|
activesupport (>= 5.0.0)
|
109
107
|
factory_bot_rails (6.2.0)
|
@@ -115,12 +113,13 @@ GEM
|
|
115
113
|
rake
|
116
114
|
globalid (1.2.1)
|
117
115
|
activesupport (>= 6.1)
|
118
|
-
|
119
|
-
i18n (1.10.0)
|
116
|
+
i18n (1.14.5)
|
120
117
|
concurrent-ruby (~> 1.0)
|
121
|
-
|
118
|
+
json (2.7.2)
|
119
|
+
language_server-protocol (3.17.0.3)
|
120
|
+
loofah (2.22.0)
|
122
121
|
crass (~> 1.0.2)
|
123
|
-
nokogiri (>= 1.
|
122
|
+
nokogiri (>= 1.12.0)
|
124
123
|
mail (2.8.1)
|
125
124
|
mini_mime (>= 0.1.1)
|
126
125
|
net-imap
|
@@ -129,9 +128,9 @@ GEM
|
|
129
128
|
matrix (0.4.2)
|
130
129
|
method_source (1.0.0)
|
131
130
|
mini_mime (1.1.2)
|
132
|
-
mini_portile2 (2.8.
|
133
|
-
minitest (5.
|
134
|
-
net-imap (0.4.
|
131
|
+
mini_portile2 (2.8.6)
|
132
|
+
minitest (5.22.3)
|
133
|
+
net-imap (0.4.11)
|
135
134
|
date
|
136
135
|
net-protocol
|
137
136
|
net-pop (0.1.2)
|
@@ -140,17 +139,18 @@ GEM
|
|
140
139
|
timeout
|
141
140
|
net-smtp (0.5.0)
|
142
141
|
net-protocol
|
143
|
-
nokogiri (1.
|
144
|
-
mini_portile2 (~> 2.8.
|
142
|
+
nokogiri (1.16.4)
|
143
|
+
mini_portile2 (~> 2.8.2)
|
145
144
|
racc (~> 1.4)
|
146
|
-
parallel (1.
|
147
|
-
parser (3.1.
|
145
|
+
parallel (1.24.0)
|
146
|
+
parser (3.3.1.0)
|
148
147
|
ast (~> 2.4.1)
|
148
|
+
racc
|
149
149
|
pry (0.14.1)
|
150
150
|
coderay (~> 1.1)
|
151
151
|
method_source (~> 1.0)
|
152
152
|
public_suffix (4.0.7)
|
153
|
-
racc (1.
|
153
|
+
racc (1.7.3)
|
154
154
|
rack (2.2.3.1)
|
155
155
|
rack-test (1.1.0)
|
156
156
|
rack (>= 1.0, < 3)
|
@@ -158,11 +158,13 @@ GEM
|
|
158
158
|
actionpack (>= 5.0.1.rc1)
|
159
159
|
actionview (>= 5.0.1.rc1)
|
160
160
|
activesupport (>= 5.0.1.rc1)
|
161
|
-
rails-dom-testing (2.0
|
162
|
-
activesupport (>=
|
161
|
+
rails-dom-testing (2.2.0)
|
162
|
+
activesupport (>= 5.0.0)
|
163
|
+
minitest
|
163
164
|
nokogiri (>= 1.6)
|
164
|
-
rails-html-sanitizer (1.
|
165
|
-
loofah (~> 2.
|
165
|
+
rails-html-sanitizer (1.6.0)
|
166
|
+
loofah (~> 2.21)
|
167
|
+
nokogiri (~> 1.14)
|
166
168
|
railties (7.0.3)
|
167
169
|
actionpack (= 7.0.3)
|
168
170
|
activesupport (= 7.0.3)
|
@@ -172,8 +174,8 @@ GEM
|
|
172
174
|
zeitwerk (~> 2.5)
|
173
175
|
rainbow (3.1.1)
|
174
176
|
rake (13.1.0)
|
175
|
-
regexp_parser (2.
|
176
|
-
rexml (3.2.
|
177
|
+
regexp_parser (2.9.0)
|
178
|
+
rexml (3.2.6)
|
177
179
|
rspec-core (3.11.0)
|
178
180
|
rspec-support (~> 3.11.0)
|
179
181
|
rspec-expectations (3.11.0)
|
@@ -191,28 +193,31 @@ GEM
|
|
191
193
|
rspec-mocks (~> 3.10)
|
192
194
|
rspec-support (~> 3.10)
|
193
195
|
rspec-support (3.11.0)
|
194
|
-
rubocop (1.
|
196
|
+
rubocop (1.63.4)
|
197
|
+
json (~> 2.3)
|
198
|
+
language_server-protocol (>= 3.17.0)
|
195
199
|
parallel (~> 1.10)
|
196
|
-
parser (>= 3.
|
200
|
+
parser (>= 3.3.0.2)
|
197
201
|
rainbow (>= 2.2.2, < 4.0)
|
198
202
|
regexp_parser (>= 1.8, < 3.0)
|
199
203
|
rexml (>= 3.2.5, < 4.0)
|
200
|
-
rubocop-ast (>= 1.
|
204
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
201
205
|
ruby-progressbar (~> 1.7)
|
202
|
-
unicode-display_width (>=
|
203
|
-
rubocop-ast (1.
|
204
|
-
parser (>= 3.
|
205
|
-
ruby-progressbar (1.
|
206
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
207
|
+
rubocop-ast (1.31.3)
|
208
|
+
parser (>= 3.3.1.0)
|
209
|
+
ruby-progressbar (1.13.0)
|
206
210
|
shoulda-matchers (5.1.0)
|
207
211
|
activesupport (>= 5.2.0)
|
208
212
|
smart_properties (1.17.0)
|
209
|
-
sqlite3 (1.
|
213
|
+
sqlite3 (1.7.3)
|
214
|
+
mini_portile2 (~> 2.8.0)
|
210
215
|
thor (1.2.1)
|
211
216
|
timecop (0.9.5)
|
212
217
|
timeout (0.4.1)
|
213
|
-
tzinfo (2.0.
|
218
|
+
tzinfo (2.0.6)
|
214
219
|
concurrent-ruby (~> 1.0)
|
215
|
-
unicode-display_width (2.
|
220
|
+
unicode-display_width (2.5.0)
|
216
221
|
xpath (3.2.0)
|
217
222
|
nokogiri (~> 1.8)
|
218
223
|
zeitwerk (2.5.4)
|
@@ -234,7 +239,7 @@ DEPENDENCIES
|
|
234
239
|
rails-controller-testing
|
235
240
|
rspec-rails
|
236
241
|
shoulda-matchers
|
237
|
-
sqlite3
|
242
|
+
sqlite3 (~> 1.7)
|
238
243
|
timecop
|
239
244
|
|
240
245
|
BUNDLED WITH
|
data/README.md
CHANGED
@@ -3,7 +3,6 @@
|
|
3
3
|
[![Build Status](https://github.com/thoughtbot/clearance/actions/workflows/tests.yml/badge.svg)]( https://github.com/thoughtbot/clearance/actions/workflows/tests.yml?query=branch%3Amain)
|
4
4
|
[![Code Climate](https://codeclimate.com/github/thoughtbot/clearance.svg)](https://codeclimate.com/github/thoughtbot/clearance)
|
5
5
|
[![Documentation Quality](https://inch-ci.org/github/thoughtbot/clearance.svg?branch=main)](https://inch-ci.org/github/thoughtbot/clearance)
|
6
|
-
[![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com)
|
7
6
|
|
8
7
|
Rails authentication with email & password.
|
9
8
|
|
@@ -63,7 +62,7 @@ Clearance.configure do |config|
|
|
63
62
|
config.url_after_denied_access_when_signed_out = nil
|
64
63
|
config.rotate_csrf_on_sign_in = true
|
65
64
|
config.same_site = nil
|
66
|
-
config.secure_cookie =
|
65
|
+
config.secure_cookie = Rails.configuration.force_ssl
|
67
66
|
config.signed_cookie = false
|
68
67
|
config.sign_in_guards = []
|
69
68
|
config.user_model = "User"
|
@@ -497,4 +496,19 @@ redistributed under the terms specified in the [`LICENSE`] file.
|
|
497
496
|
[`LICENSE`]: /LICENSE
|
498
497
|
|
499
498
|
<!-- START /templates/footer.md -->
|
499
|
+
## About thoughtbot
|
500
|
+
|
501
|
+
![thoughtbot](https://thoughtbot.com/thoughtbot-logo-for-readmes.svg)
|
502
|
+
|
503
|
+
This repo is maintained and funded by thoughtbot, inc.
|
504
|
+
The names and logos for thoughtbot are trademarks of thoughtbot, inc.
|
505
|
+
|
506
|
+
We love open source software!
|
507
|
+
See [our other projects][community].
|
508
|
+
We are [available for hire][hire].
|
509
|
+
|
510
|
+
[community]: https://thoughtbot.com/community?utm_source=github
|
511
|
+
[hire]: https://thoughtbot.com/hire-us?utm_source=github
|
512
|
+
|
513
|
+
|
500
514
|
<!-- END /templates/footer.md -->
|
data/SECURITY.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# Security Policy
|
2
|
+
|
3
|
+
## Supported Versions
|
4
|
+
|
5
|
+
We will provide security updates for the latest 3 versions.
|
6
|
+
|
7
|
+
| Version | Security updates |
|
8
|
+
| - | - |
|
9
|
+
| 2.7.x | ✅ |
|
10
|
+
| 2.6.x | ✅ |
|
11
|
+
| 2.5.x | ✅ |
|
12
|
+
| < 2.5.0 | :x: |
|
13
|
+
|
14
|
+
## Reporting a Vulnerability
|
15
|
+
|
16
|
+
You can contact <security@thoughtbot.com>. See <https://thoughtbot.com/security> for more information about our security policy.
|
data/gemfiles/rails_6.1.gemfile
CHANGED
data/gemfiles/rails_7.0.gemfile
CHANGED
data/gemfiles/rails_7.1.gemfile
CHANGED
@@ -135,7 +135,7 @@ module Clearance
|
|
135
135
|
# The parameter for user routes. By default this is derived from the user
|
136
136
|
# model.
|
137
137
|
# @return [Symbol]
|
138
|
-
|
138
|
+
attr_writer :user_parameter
|
139
139
|
|
140
140
|
# Controls wether users are automatically signed in after successfully
|
141
141
|
# resetting their password.
|
data/lib/clearance/engine.rb
CHANGED
data/lib/clearance/user.rb
CHANGED
data/lib/clearance/version.rb
CHANGED
data/lib/clearance.rb
CHANGED
@@ -5,9 +5,9 @@ require 'clearance/rack_session'
|
|
5
5
|
require 'clearance/back_door'
|
6
6
|
require 'clearance/controller'
|
7
7
|
require 'clearance/user'
|
8
|
-
require 'clearance/engine'
|
9
8
|
require 'clearance/password_strategies'
|
10
9
|
require 'clearance/constraints'
|
10
|
+
require 'clearance/engine'
|
11
11
|
|
12
12
|
module Clearance
|
13
13
|
end
|
data/spec/models/user_spec.rb
CHANGED
@@ -5,15 +5,16 @@ describe User do
|
|
5
5
|
it { is_expected.to have_db_index(:remember_token) }
|
6
6
|
it { is_expected.to validate_presence_of(:email) }
|
7
7
|
it { is_expected.to validate_presence_of(:password) }
|
8
|
-
it { is_expected.to allow_value("foo;@example.com").for(:email) }
|
9
|
-
it { is_expected.to allow_value("foo@.example.com").for(:email) }
|
10
|
-
it { is_expected.to allow_value("foo@example..com").for(:email) }
|
11
8
|
it { is_expected.to allow_value("foo@example.co.uk").for(:email) }
|
12
9
|
it { is_expected.to allow_value("foo@example.com").for(:email) }
|
13
10
|
it { is_expected.to allow_value("foo+bar@example.com").for(:email) }
|
14
11
|
it { is_expected.not_to allow_value("example.com").for(:email) }
|
15
12
|
it { is_expected.not_to allow_value("foo").for(:email) }
|
16
13
|
it { is_expected.not_to allow_value("foo@").for(:email) }
|
14
|
+
it { is_expected.not_to allow_value("foo@bar").for(:email) }
|
15
|
+
it { is_expected.not_to allow_value("foo;@example.com").for(:email) }
|
16
|
+
it { is_expected.not_to allow_value("foo@.example.com").for(:email) }
|
17
|
+
it { is_expected.not_to allow_value("foo@example..com").for(:email) }
|
17
18
|
|
18
19
|
describe "#email" do
|
19
20
|
it "stores email in down case and removes whitespace" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clearance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Croak
|
@@ -26,7 +26,7 @@ authors:
|
|
26
26
|
autorequire:
|
27
27
|
bindir: bin
|
28
28
|
cert_chain: []
|
29
|
-
date: 2024-
|
29
|
+
date: 2024-06-28 00:00:00.000000000 Z
|
30
30
|
dependencies:
|
31
31
|
- !ruby/object:Gem::Dependency
|
32
32
|
name: bcrypt
|
@@ -160,6 +160,7 @@ files:
|
|
160
160
|
- README.md
|
161
161
|
- RELEASING.md
|
162
162
|
- Rakefile
|
163
|
+
- SECURITY.md
|
163
164
|
- app/controllers/clearance/base_controller.rb
|
164
165
|
- app/controllers/clearance/passwords_controller.rb
|
165
166
|
- app/controllers/clearance/sessions_controller.rb
|