rack 3.1.21 → 3.1.22
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 +4 -4
- data/CHANGELOG.md +31 -1
- data/lib/rack/multipart/parser.rb +6 -0
- data/lib/rack/utils.rb +3 -3
- data/lib/rack/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f3f9b36f03c948233dee682ef0a4724302be7f64dee1b599d45c7ef4068c6b0c
|
|
4
|
+
data.tar.gz: 428c57448bdc479dd1bab423ff9df7376e660a9603b648de733c7c08ae186693
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f25b66f8c806f983f6ec504f5c97ffeec03d1994d8ba508763fb903923c28a9d6a85feab7bba9f6da248e90ef6697dabda9da32ea62d3935259ea4e963ad79d2
|
|
7
|
+
data.tar.gz: 2cc6a87b8003ed98a246913322e266e83e7c3cd1247e27e2540dbed28910cfef76c34dbd635f26da547817f2136d87468be6b3c98566c627fbf9b854f51cce62
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. For info on how to format all future additions to this file please reference [Keep A Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
+
## [3.1.22] - 2026-08-13
|
|
6
|
+
|
|
7
|
+
### Security
|
|
8
|
+
|
|
9
|
+
- [CVE-2026-26962](https://github.com/advisories/GHSA-rx22-g9mx-qrhv) Improper unfolding of folded multipart headers preserves CRLF in parsed parameter values.
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- Restore Ruby 2.4/2.5 compatibility.
|
|
14
|
+
|
|
5
15
|
## [3.1.21] - 2026-04-01
|
|
6
16
|
|
|
7
17
|
### Security
|
|
@@ -17,7 +27,7 @@ All notable changes to this project will be documented in this file. For info on
|
|
|
17
27
|
- [CVE-2026-34830](https://github.com/advisories/GHSA-qv7j-4883-hwh7) `Rack::Sendfile` header-based `X-Accel-Mapping` regex injection enables unauthorized `X-Accel-Redirect`.
|
|
18
28
|
- [CVE-2026-34785](https://github.com/advisories/GHSA-h2jq-g4cq-5ppq) `Rack::Static` prefix matching can expose unintended files under the static root.
|
|
19
29
|
- [CVE-2026-34829](https://github.com/advisories/GHSA-8vqr-qjwx-82mw) Multipart parsing without `Content-Length` header allows unbounded chunked file uploads.
|
|
20
|
-
- [CVE-2026-34827](https://github.com/advisories/GHSA-v6x5-cg8r-vv6x)
|
|
30
|
+
- [CVE-2026-34827](https://github.com/advisories/GHSA-v6x5-cg8r-vv6x) Multipart header parsing allows denial of service via escape-heavy quoted parameters.
|
|
21
31
|
|
|
22
32
|
## [3.1.20] - 2026-02-16
|
|
23
33
|
|
|
@@ -410,6 +420,26 @@ Rack v3.1 is primarily a maintenance release that removes features deprecated in
|
|
|
410
420
|
- Fix multipart filename generation for filenames that contain spaces. Encode spaces as "%20" instead of "+" which will be decoded properly by the multipart parser. ([#1736](https://github.com/rack/rack/pull/1645), [@muirdm](https://github.com/muirdm))
|
|
411
421
|
- `Rack::Request#scheme` returns `ws` or `wss` when one of the `X-Forwarded-Scheme` / `X-Forwarded-Proto` headers is set to `ws` or `wss`, respectively. ([#1730](https://github.com/rack/rack/issues/1730), [@erwanst](https://github.com/erwanst))
|
|
412
422
|
|
|
423
|
+
## [2.2.24] - 2026-08-13
|
|
424
|
+
|
|
425
|
+
### Security
|
|
426
|
+
|
|
427
|
+
- [CVE-2026-26962](https://github.com/advisories/GHSA-rx22-g9mx-qrhv) Improper unfolding of folded multipart headers preserves CRLF in parsed parameter values.
|
|
428
|
+
|
|
429
|
+
## [2.2.23] - 2026-04-01
|
|
430
|
+
|
|
431
|
+
### Security
|
|
432
|
+
|
|
433
|
+
- [CVE-2026-34763](https://github.com/advisories/GHSA-7mqq-6cf9-v2qp) Root directory disclosure via unescaped regex interpolation in `Rack::Directory`.
|
|
434
|
+
- [CVE-2026-34230](https://github.com/advisories/GHSA-v569-hp3g-36wr) Avoid O(n^2) algorithm in `Rack::Utils.select_best_encoding` which could lead to denial of service.
|
|
435
|
+
- [CVE-2026-26961](https://github.com/advisories/GHSA-vgpv-f759-9wx3) Raise error for multipart requests with multiple boundary parameters.
|
|
436
|
+
- [CVE-2026-34786](https://github.com/advisories/GHSA-q4qf-9j86-f5mh) `Rack::Static` `header_rules` bypass via URL-encoded path mismatch.
|
|
437
|
+
- [CVE-2026-34831](https://github.com/advisories/GHSA-q2ww-5357-x388) `Content-Length` mismatch in `Rack::Files` error responses.
|
|
438
|
+
- [CVE-2026-34826](https://github.com/advisories/GHSA-x8cg-fq8g-mxfx) Multipart byte range processing allows denial of service via excessive overlapping ranges.
|
|
439
|
+
- [CVE-2026-34830](https://github.com/advisories/GHSA-qv7j-4883-hwh7) `Rack::Sendfile` header-based `X-Accel-Mapping` regex injection enables unauthorized `X-Accel-Redirect`.
|
|
440
|
+
- [CVE-2026-34785](https://github.com/advisories/GHSA-h2jq-g4cq-5ppq) `Rack::Static` prefix matching can expose unintended files under the static root.
|
|
441
|
+
- [CVE-2026-34829](https://github.com/advisories/GHSA-8vqr-qjwx-82mw) Multipart parsing without `Content-Length` header allows unbounded chunked file uploads.
|
|
442
|
+
|
|
413
443
|
## [2.2.22] - 2026-02-16
|
|
414
444
|
|
|
415
445
|
### Security
|
|
@@ -360,13 +360,19 @@ module Rack
|
|
|
360
360
|
|
|
361
361
|
CONTENT_DISPOSITION_MAX_PARAMS = 16
|
|
362
362
|
CONTENT_DISPOSITION_MAX_BYTES = 1536
|
|
363
|
+
OBS_UNFOLD = /\r\n([ \t])/
|
|
364
|
+
private_constant :OBS_UNFOLD
|
|
363
365
|
def handle_mime_head
|
|
364
366
|
if @sbuf.scan_until(@head_regex)
|
|
365
367
|
head = @sbuf[1]
|
|
366
368
|
content_type = head[MULTIPART_CONTENT_TYPE, 1]
|
|
369
|
+
content_type.gsub!(OBS_UNFOLD, '\\1') if content_type
|
|
367
370
|
if (disposition = head[MULTIPART_CONTENT_DISPOSITION, 1]) &&
|
|
368
371
|
disposition.bytesize <= CONTENT_DISPOSITION_MAX_BYTES
|
|
369
372
|
|
|
373
|
+
# Implement OBS unfolding (RFC 5322 Section 2.2.3)
|
|
374
|
+
disposition.gsub!(OBS_UNFOLD, '\\1')
|
|
375
|
+
|
|
370
376
|
# ignore actual content-disposition value (should always be form-data)
|
|
371
377
|
i = disposition.index(';')
|
|
372
378
|
disposition.slice!(0, i+1)
|
data/lib/rack/utils.rb
CHANGED
|
@@ -146,8 +146,8 @@ module Rack
|
|
|
146
146
|
end
|
|
147
147
|
end
|
|
148
148
|
|
|
149
|
-
|
|
150
|
-
private_constant :
|
|
149
|
+
ALLOWED_FORWARDED_PARAMS = %w[by for host proto].map { |name| [name, name.to_sym] }.to_h.freeze
|
|
150
|
+
private_constant :ALLOWED_FORWARDED_PARAMS
|
|
151
151
|
|
|
152
152
|
def forwarded_values(forwarded_header)
|
|
153
153
|
return unless forwarded_header
|
|
@@ -170,7 +170,7 @@ module Rack
|
|
|
170
170
|
param.chomp!('=')
|
|
171
171
|
param.strip!
|
|
172
172
|
param.downcase!
|
|
173
|
-
return unless param =
|
|
173
|
+
return unless param = ALLOWED_FORWARDED_PARAMS[param]
|
|
174
174
|
|
|
175
175
|
if header[0] == '"'
|
|
176
176
|
# Parameter value is quoted, parse it, handling backslash escapes
|
data/lib/rack/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rack
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.1.
|
|
4
|
+
version: 3.1.22
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Leah Neukirchen
|
|
@@ -156,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
156
156
|
- !ruby/object:Gem::Version
|
|
157
157
|
version: '0'
|
|
158
158
|
requirements: []
|
|
159
|
-
rubygems_version: 4.0.
|
|
159
|
+
rubygems_version: 4.0.10
|
|
160
160
|
specification_version: 4
|
|
161
161
|
summary: A modular Ruby webserver interface.
|
|
162
162
|
test_files: []
|