rack-wwwhisper 1.1.15 → 1.1.16

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: 56fa87da05d8ff7462f8b42110d7745d25a98449f52a457b0d20f506c84ff6de
4
- data.tar.gz: b4703dc227718a73741fb5d347f00f4d1b43c11803dfe9ff6214ecefc4524b2e
3
+ metadata.gz: 43c45463306f996ac2ef278b0c3b6044c45b21843c5a578736daa0fdccb1f759
4
+ data.tar.gz: 7b8bc611d66b8ce9dd7c46c78ff89254e232b62dce8beece664c725bbd28a61f
5
5
  SHA512:
6
- metadata.gz: c785b6cdb26d65d23bc3d5620fcc48be33658e2048f62873eb53556b0bf24c6913a06537a557adb91fea9e7aa4917626a896720d41b6b3d76624c90f084d706c
7
- data.tar.gz: d51417c8611c091cf9f14cad8ea967eafe8eb32e4d90f5e02fe9a0dc833eccfa4be1117f7dc759c6c879f281a06c83e4c5a464682ffc900aa5c57eab993078de
6
+ metadata.gz: 0aaa09cc2c8a31ccd5c0f552720092438b0626c3ece9643f53c4168672aac097c0ede3d108ce4eb964124e6fd540481ce48f656d3e3ad977aa611a319666809d
7
+ data.tar.gz: 4bd63d6fb60b319fd081df7c7d2e2850b9d494629881f7fc60f31a09f2c75b3015f5447138302c25e1d6fae2d0c0da823849ff179b5cd2723fa3895f2c168f90
@@ -45,7 +45,7 @@ class WWWhisper
45
45
  # discovered and the library needs to be updated.
46
46
  @@FORWARDED_HEADERS = ['Accept', 'Accept-Language', 'Cookie', 'Origin',
47
47
  'X-CSRFToken', 'X-Requested-With']
48
- @@DEFAULT_IFRAME = %Q[<script type="text/javascript" src="%s"> </script>
48
+ @@DEFAULT_IFRAME = %Q[<script src="%s"> </script>
49
49
  ]
50
50
 
51
51
  # Following environment variables are recognized:
@@ -196,22 +196,25 @@ class WWWhisper
196
196
  end
197
197
 
198
198
  def sub_response_headers_to_rack(rack_req, sub_resp)
199
+ cookies = sub_resp.get_fields('Set-Cookie')
199
200
  if Rack.const_defined?('Headers')
200
201
  # Rack 3+
201
202
  rack_headers = Rack::Headers.new()
203
+ # Multiple Set-Cookie headers need to be set as an array (new
204
+ # Rack SPEC)
205
+ rack_headers['Set-Cookie'] = cookies if cookies
202
206
  else
203
207
  # Older Rack versions
204
208
  rack_headers = Rack::Utils::HeaderHash.new()
209
+ # Multiple Set-Cookie headers need to be set as a single value
210
+ # separated by \n (old Rack SPEC)
211
+ rack_headers['Set-Cookie'] = cookies.join("\n") if cookies
205
212
  end
206
213
  sub_resp.each_capitalized do |header, value|
207
214
  # If sub request returned chunked response, remove the header
208
215
  # (chunks will be combined and returned with 'Content-Length).
209
216
  rack_headers[header] = value if header !~ /Transfer-Encoding|Set-Cookie/
210
217
  end
211
- # Multiple Set-Cookie headers need to be set as a single value
212
- # separated by \n (see Rack SPEC).
213
- cookies = sub_resp.get_fields('Set-Cookie')
214
- rack_headers['Set-Cookie'] = cookies.join("\n") if cookies
215
218
  return rack_headers
216
219
  end
217
220
 
@@ -1,3 +1,3 @@
1
1
  module Rack
2
- WWWHISPER_VERSION = '1.1.15'
2
+ WWWHISPER_VERSION = '1.1.16'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-wwwhisper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.15
4
+ version: 1.1.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Wrobel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-20 00:00:00.000000000 Z
11
+ date: 2024-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -130,14 +130,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
130
130
  requirements:
131
131
  - - ">="
132
132
  - !ruby/object:Gem::Version
133
- version: '0'
133
+ version: 2.0.0
134
134
  required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  requirements: []
140
- rubygems_version: 3.3.7
140
+ rubygems_version: 3.5.16
141
141
  signing_key:
142
142
  specification_version: 4
143
143
  summary: Verified email based authorization for Rack applications.