clearance 2.9.1 → 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: b3164482da14d878bfca32632ebbabf81635add8143adaca1be3baa7ec41cd83
4
- data.tar.gz: 037f0f5a5c30f3022b0d29a9c100e40538c0b176b4935c061ec96c469d8c3ca9
3
+ metadata.gz: d073db2741ab71668d850e8dbaf90ca72b53e3e5a89d3f559b81f8f134e97f21
4
+ data.tar.gz: 040fa25f6c685961366b26c9ea6a5889885aee3e17969459aa902db2355160c8
5
5
  SHA512:
6
- metadata.gz: 5b889666cb2a46f6bfdcf41b9aaf9c7f0414b986f07ab4f31bb4846d3b4ef900f3d6076d50d9f8463657033488b118472d9e8dace8c4786aadd0f2999f5b2bed
7
- data.tar.gz: 0fbc755f11f689843852ef18201963d0d56be06b8bf22326e82d2c83162d092ade4af85dfff3469867e0cf3937f545351a84b83425094cfb064d3466c361dd7c
6
+ metadata.gz: cc224586b281768a92734b9d56eaedb0788de1b894f5fbaebff4d7eb0414cfcfb90286db50206bb060fad8ec26cd9aabd9f8f8dff94253832e6b9576c86347d7
7
+ data.tar.gz: 279be8bc4d4d5024dd14103de0d9feac00b483364200b4cf0edda9b2a9098360f0ba8a19d9b6fe590200463d7458e291d7980a59a618628fc7b1c72d98b8e001
data/CHANGELOG.md CHANGED
@@ -5,11 +5,18 @@ 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.1...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
9
14
 
10
15
  ## [2.9.1] - October 29, 2024
11
16
  - Update gemspec
12
17
 
18
+ [2.9.1]: https://github.com/thoughtbot/clearance/compare/v2.9.0...v2.9.1
19
+
13
20
  ## [2.9.0] - October 29, 2024
14
21
  - Added Rails 7.2 and Ruby 3.3 to testing matrix
15
22
  and overhauled dummy app (#1032) Hamed Asghari
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- clearance (2.9.1)
4
+ clearance (2.9.2)
5
5
  actionmailer (>= 5.0)
6
6
  activemodel (>= 5.0)
7
7
  activerecord (>= 5.0)
@@ -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.1".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.1
4
+ version: 2.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Croak
@@ -27,7 +27,7 @@ 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