clearance 2.9.0 → 2.9.2

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: ea787197f1c05708009b5318ed67814d74c11de000e314d87d0d2f9278722ea7
4
- data.tar.gz: 9def5796663a629edecd2a9ad34aadb3b3430d4f00b4ba1017259bc929321911
3
+ metadata.gz: d073db2741ab71668d850e8dbaf90ca72b53e3e5a89d3f559b81f8f134e97f21
4
+ data.tar.gz: 040fa25f6c685961366b26c9ea6a5889885aee3e17969459aa902db2355160c8
5
5
  SHA512:
6
- metadata.gz: 374df1a9550bb8379625497e010c79d264e328d9763341e6c5a1e1e01a42d3085650b5872d92df32a14d06c1d88f82ae9bcb4912ab717790800bce9237847c4a
7
- data.tar.gz: 370f291a30b646bb3afcf9bc27fdccf13facec4c9663e44d4efbab0006430066891849c77fe788225a8145636507a8a03ac6360d3e195d7f7f304d8270a28054
6
+ metadata.gz: cc224586b281768a92734b9d56eaedb0788de1b894f5fbaebff4d7eb0414cfcfb90286db50206bb060fad8ec26cd9aabd9f8f8dff94253832e6b9576c86347d7
7
+ data.tar.gz: 279be8bc4d4d5024dd14103de0d9feac00b483364200b4cf0edda9b2a9098360f0ba8a19d9b6fe590200463d7458e291d7980a59a618628fc7b1c72d98b8e001
data/CHANGELOG.md CHANGED
@@ -5,7 +5,17 @@ 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.9.0...main
8
+ [Unreleased]: https://github.com/thoughtbot/clearance/compare/v2.9.2...main
9
+
10
+ ## [2.9.2] - November 14, 2024
11
+ - Fix query params being clobbered by Clearance::BackDoor (#1041) Frederick Cheung
12
+
13
+ [2.9.2]: https://github.com/thoughtbot/clearance/compare/v2.9.1...v2.9.2
14
+
15
+ ## [2.9.1] - October 29, 2024
16
+ - Update gemspec
17
+
18
+ [2.9.1]: https://github.com/thoughtbot/clearance/compare/v2.9.0...v2.9.1
9
19
 
10
20
  ## [2.9.0] - October 29, 2024
11
21
  - Added Rails 7.2 and Ruby 3.3 to testing matrix
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- clearance (2.8.0)
4
+ clearance (2.9.2)
5
5
  actionmailer (>= 5.0)
6
6
  activemodel (>= 5.0)
7
7
  activerecord (>= 5.0)
@@ -147,7 +147,7 @@ GEM
147
147
  mini_mime (1.1.5)
148
148
  mini_portile2 (2.8.7)
149
149
  minitest (5.25.1)
150
- net-imap (0.4.14)
150
+ net-imap (0.5.0)
151
151
  date
152
152
  net-protocol
153
153
  net-pop (0.1.2)
data/clearance.gemspec CHANGED
@@ -1,13 +1,13 @@
1
1
  require_relative 'lib/clearance/version'
2
2
 
3
3
  Gem::Specification.new do |s|
4
- s.add_dependency 'bcrypt', '~> 3.1', '>= 3.1.1'
4
+ s.add_dependency 'bcrypt', '>= 3.1.1'
5
5
  s.add_dependency 'argon2', '~> 2.0', '>= 2.0.2'
6
6
  s.add_dependency 'email_validator', '~> 2.0'
7
- s.add_dependency 'railties', '~> 5.0'
8
- s.add_dependency 'activemodel', '~> 5.0'
9
- s.add_dependency 'activerecord', '~> 5.0'
10
- s.add_dependency 'actionmailer', '~> 5.0'
7
+ s.add_dependency 'railties', '>= 5.0'
8
+ s.add_dependency 'activemodel', '>= 5.0'
9
+ s.add_dependency 'activerecord', '>= 5.0'
10
+ s.add_dependency 'actionmailer', '>= 5.0'
11
11
  s.authors = [
12
12
  'Dan Croak',
13
13
  'Eugene Bolshakov',
@@ -54,7 +54,6 @@ module Clearance
54
54
  if user_param.present?
55
55
  query_string = Rack::Utils.build_query(params)
56
56
  env[Rack::QUERY_STRING] = query_string
57
- env[Rack::RACK_REQUEST_QUERY_STRING] = query_string
58
57
  user = find_user(user_param)
59
58
  env[:clearance].sign_in(user)
60
59
  end
@@ -1,3 +1,3 @@
1
1
  module Clearance
2
- VERSION = "2.9.0".freeze
2
+ VERSION = "2.9.2".freeze
3
3
  end
@@ -2,6 +2,6 @@ class ApplicationController < ActionController::Base
2
2
  include Clearance::Controller
3
3
 
4
4
  def show
5
- render inline: "Hello user #<%= current_user.id %>", layout: false
5
+ render inline: "Hello user #<%= current_user.id %> #{params.to_json}", layout: false
6
6
  end
7
7
  end
@@ -8,4 +8,12 @@ describe "Backdoor Middleware" do
8
8
 
9
9
  expect(cookies["remember_token"]).to eq user.remember_token
10
10
  end
11
+
12
+ it "removes the `as` param but leaves other parameters unchanged" do
13
+ user = create(:user)
14
+
15
+ get root_path(as: user.to_param, foo: 'bar')
16
+
17
+ expect(response.body).to include('{"foo":"bar","controller":"application","action":"show"}')
18
+ end
11
19
  end
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.9.0
4
+ version: 2.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Croak
@@ -27,15 +27,12 @@ authors:
27
27
  autorequire:
28
28
  bindir: bin
29
29
  cert_chain: []
30
- date: 2024-10-29 00:00:00.000000000 Z
30
+ date: 2024-11-14 00:00:00.000000000 Z
31
31
  dependencies:
32
32
  - !ruby/object:Gem::Dependency
33
33
  name: bcrypt
34
34
  requirement: !ruby/object:Gem::Requirement
35
35
  requirements:
36
- - - "~>"
37
- - !ruby/object:Gem::Version
38
- version: '3.1'
39
36
  - - ">="
40
37
  - !ruby/object:Gem::Version
41
38
  version: 3.1.1
@@ -43,9 +40,6 @@ dependencies:
43
40
  prerelease: false
44
41
  version_requirements: !ruby/object:Gem::Requirement
45
42
  requirements:
46
- - - "~>"
47
- - !ruby/object:Gem::Version
48
- version: '3.1'
49
43
  - - ">="
50
44
  - !ruby/object:Gem::Version
51
45
  version: 3.1.1
@@ -87,56 +81,56 @@ dependencies:
87
81
  name: railties
88
82
  requirement: !ruby/object:Gem::Requirement
89
83
  requirements:
90
- - - "~>"
84
+ - - ">="
91
85
  - !ruby/object:Gem::Version
92
86
  version: '5.0'
93
87
  type: :runtime
94
88
  prerelease: false
95
89
  version_requirements: !ruby/object:Gem::Requirement
96
90
  requirements:
97
- - - "~>"
91
+ - - ">="
98
92
  - !ruby/object:Gem::Version
99
93
  version: '5.0'
100
94
  - !ruby/object:Gem::Dependency
101
95
  name: activemodel
102
96
  requirement: !ruby/object:Gem::Requirement
103
97
  requirements:
104
- - - "~>"
98
+ - - ">="
105
99
  - !ruby/object:Gem::Version
106
100
  version: '5.0'
107
101
  type: :runtime
108
102
  prerelease: false
109
103
  version_requirements: !ruby/object:Gem::Requirement
110
104
  requirements:
111
- - - "~>"
105
+ - - ">="
112
106
  - !ruby/object:Gem::Version
113
107
  version: '5.0'
114
108
  - !ruby/object:Gem::Dependency
115
109
  name: activerecord
116
110
  requirement: !ruby/object:Gem::Requirement
117
111
  requirements:
118
- - - "~>"
112
+ - - ">="
119
113
  - !ruby/object:Gem::Version
120
114
  version: '5.0'
121
115
  type: :runtime
122
116
  prerelease: false
123
117
  version_requirements: !ruby/object:Gem::Requirement
124
118
  requirements:
125
- - - "~>"
119
+ - - ">="
126
120
  - !ruby/object:Gem::Version
127
121
  version: '5.0'
128
122
  - !ruby/object:Gem::Dependency
129
123
  name: actionmailer
130
124
  requirement: !ruby/object:Gem::Requirement
131
125
  requirements:
132
- - - "~>"
126
+ - - ">="
133
127
  - !ruby/object:Gem::Version
134
128
  version: '5.0'
135
129
  type: :runtime
136
130
  prerelease: false
137
131
  version_requirements: !ruby/object:Gem::Requirement
138
132
  requirements:
139
- - - "~>"
133
+ - - ">="
140
134
  - !ruby/object:Gem::Version
141
135
  version: '5.0'
142
136
  description: |2