usps-jwt_auth 1.2.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 17662af2194b354229fdc800d007e1121fb3a34dbb65bcf1a8e1df2ec0011087
4
- data.tar.gz: 7a2017a06711cb9a4714b111a4a2ee85ca3ede7c7e9d0d851e098d1dd83fa302
3
+ metadata.gz: 55690055320ed2dfe5ace756f990bedd8769a5003750baa7ab13828330a78052
4
+ data.tar.gz: 9bbadbdcb087a8645b2b057a01020589aacbf0d6a5d498fcc907f30f3e667150
5
5
  SHA512:
6
- metadata.gz: 33b3ce36812329c3d25a890fd1c5d0c8b591671fef159fd602276b5217f238c021e65c60512e1ea75dc5addc07d6b1f56b0b6c2329c027cfe79362f9752752c4
7
- data.tar.gz: e7e2aed19988c5148ad9550e20b94e018ac1fad129704badbce18a35f027d9c5da231b1570d7eb9821d08838921af238fed223cdd7412b72e5f2b9dab69a7f41
6
+ metadata.gz: 57e395c8ee636d9ac8b7d1709927fab0506f4b20acf146925e22829da835bcf943c6151e5732c9b9c6271f348355e8daf7f0c346b31c8bfb9114c93591f03620
7
+ data.tar.gz: f7bdfdb5a52b589639f81481e9bb2bf6906f94b037b0865bb22e91a94db10bd91c0c049922f9243f87c2faa49599e08b97a3686a2e2a74921ef2c98166a2fb23
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- usps-jwt_auth (1.2.2)
4
+ usps-jwt_auth (1.2.3)
5
5
  activesupport (~> 8.0)
6
6
  colorize (~> 1.1)
7
7
  fileutils (~> 1.7)
@@ -84,9 +84,15 @@ module Usps
84
84
  @set_new_jwt = true
85
85
  end
86
86
 
87
+ # Back to where the login began, with the query it began with. The query rides through the login
88
+ # as a single `query_string` parameter, and is unpacked here rather than handed on still packed.
89
+ # It is re-encoded rather than passed through as received, so the redirect stays well-formed
90
+ # whatever arrives.
87
91
  def redirect_to_path!
88
92
  path = params[:path] || root_path
89
- redirect_to(params.key?(:query_string) ? "#{path}?query_string=#{CGI.escape(params[:query_string])}" : path)
93
+ pairs = URI.decode_www_form(params[:query_string].to_s).reject { |key, _value| key.empty? }
94
+
95
+ redirect_to(pairs.empty? ? path : "#{path}?#{URI.encode_www_form(pairs)}")
90
96
  end
91
97
 
92
98
  def store_jwt(token)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Usps
4
4
  module JwtAuth
5
- VERSION = '1.2.2'
5
+ VERSION = '1.2.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: usps-jwt_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander