rack 3.1.16 → 3.2.2

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: 9cfb0a3abaaa98c515919466c018ed20c30b3f4d025d0ec68cfc61614735270f
4
- data.tar.gz: 4fd015b49d2c70a01d6518ea38b593d14b6d93de09132c3142390ab5fd719ff2
3
+ metadata.gz: '080d2911dca86ef9f377de17b22e51f04472e25d2af32cc9effd975097785f1a'
4
+ data.tar.gz: c3ee87b2b5bc8e676986c4b9d48ebfc97420a69a02fb0a945f340f34b4578349
5
5
  SHA512:
6
- metadata.gz: db64e3a6431f22b41af6ec7a31d38465d4db45612843f402692893665d88c904d4058469137372b208dbc6d79d7dcde12460e4fb7707681d81de8d3a6dc8e45f
7
- data.tar.gz: 695b14f7308dfb1a6be5304fb9bcf460ee855e296308ad114d8b9f12b9dcb420a17d4af3883f3a47f3fc66df2e28793fe4871965dec51b557840d136de14c22c
6
+ metadata.gz: bd897ed5e78fb8ce1ba9c542f5233d8c49e309004f826d4e112127a23ff55fd5758ae90b6856b209c156cbc5695eb28c1c27a5d0fb036cdffd94c91a9096fb4e
7
+ data.tar.gz: 053d5a2eaa6cdaed9404b2da2c7a7e730c73dea77ebdd75a4628b150b1e59bbc5fa2e81ea56edb0a6df6da122f94d621292f74d0263ffe0721d7e07c81e4e897
data/CHANGELOG.md CHANGED
@@ -2,12 +2,93 @@
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.2.2] - 2025-10-07
6
+
7
+ ### Security
8
+
9
+ - [CVE-2025-61772](https://github.com/advisories/GHSA-wpv5-97wm-hp9c) Multipart parser buffers unbounded per-part headers, enabling DoS (memory exhaustion)
10
+ - [CVE-2025-61771](https://github.com/advisories/GHSA-w9pc-fmgc-vxvw) Multipart parser buffers large non‑file fields entirely in memory, enabling DoS (memory exhaustion)
11
+ - [CVE-2025-61770](https://github.com/advisories/GHSA-p543-xpfm-54cp) Unbounded multipart preamble buffering enables DoS (memory exhaustion)
12
+
13
+ ## [3.2.1] -- 2025-09-02
14
+
15
+ ### Added
16
+
17
+ - Add support for streaming bodies when using `Rack::Events`. ([#2375](github.com/rack/rack/pull/2375), [@unflxw](https://github.com/unflxw))
18
+
19
+ ### Fixed
20
+
21
+ - Fix an issue where a `NoMethodError` would be raised when using `Rack::Events` with streaming bodies. ([#2375](github.com/rack/rack/pull/2375), [@unflxw](https://github.com/unflxw))
22
+
23
+ ## [3.2.0] - 2025-07-31
24
+
25
+ This release continues Rack's evolution toward a cleaner, more efficient foundation while maintaining backward compatibility for most applications. The breaking changes primarily affect deprecated functionality, so most users should experience a smooth upgrade with improved performance and standards compliance.
26
+
27
+ ### SPEC Changes
28
+
29
+ - Request environment keys must now be strings. ([#2310](https://github.com/rack/rack/issues/2310), [@jeremyevans])
30
+ - Add `nil` as a valid return from a Response `body.to_path` ([#2318](https://github.com/rack/rack/pull/2318), [@MSP-Greg])
31
+ - `Rack::Lint#check_header_value` is relaxed, only disallowing CR/LF/NUL characters. ([#2354](https://github.com/rack/rack/pull/2354), [@ioquatix])
32
+
33
+ ### Added
34
+
35
+ - Introduce `Rack::VERSION` constant. ([#2199](https://github.com/rack/rack/pull/2199), [@ioquatix])
36
+ - `ISO-2022-JP` encoded parts within MIME Multipart sections of an HTTP request body will now be converted to `UTF-8`. ([#2245](https://github.com/rack/rack/pull/2245), [@nappa](https://github.com/nappa))
37
+ - Add `Rack::Request#query_parser=` to allow setting the query parser to use. ([#2349](https://github.com/rack/rack/pull/2349), [@jeremyevans])
38
+ - Add `Rack::Request#form_pairs` to access form data as raw key-value pairs, preserving duplicate keys. ([#2351](https://github.com/rack/rack/pull/2351), [@matthewd])
39
+
40
+ ### Changed
41
+
42
+ - Invalid cookie keys will now raise an error. ([#2193](https://github.com/rack/rack/pull/2193), [@ioquatix])
43
+ - `Rack::MediaType#params` now handles empty strings. ([#2229](https://github.com/rack/rack/pull/2229), [@jeremyevans])
44
+ - Avoid unnecessary calls to the `ip_filter` lambda to evaluate `Request#ip` ([#2287](https://github.com/rack/rack/pull/2287), [@willbryant])
45
+ - Only calculate `Request#ip` once per request ([#2292](https://github.com/rack/rack/pull/2292), [@willbryant])
46
+ - `Rack::Builder` `#use`, `#map`, and `#run` methods now return `nil`. ([#2355](https://github.com/rack/rack/pull/2355), [@ioquatix])
47
+ - Directly close the body in `Rack::ConditionalGet` when the response is `304 Not Modified`. ([#2353](https://github.com/rack/rack/pull/2353), [@ioquatix])
48
+ - Directly close the body in `Rack::Head` when the request method is `HEAD`([#2360](https://github.com/rack/rack/pull/2360), [@skipkayhil](https://github.com/skipkayhil))
49
+
50
+ ### Deprecated
51
+
52
+ - `Rack::Auth::AbstractRequest#request` is deprecated without replacement. ([#2229](https://github.com/rack/rack/pull/2229), [@jeremyevans])
53
+ - `Rack::Request#parse_multipart` (private method designed to be overridden in subclasses) is deprecated without replacement. ([#2229](https://github.com/rack/rack/pull/2229), [@jeremyevans])
54
+
55
+ ### Removed
56
+
57
+ - `Rack::Request#values_at` is removed. ([#2200](https://github.com/rack/rack/pull/2200), [@ioquatix])
58
+ - `Rack::Logger` is removed with no replacement. ([#2196](https://github.com/rack/rack/pull/2196), [@ioquatix])
59
+ - Automatic cache invalidation in `Rack::Request#{GET,POST}` has been removed. ([#2230](https://github.com/rack/rack/pull/2230), [@jeremyevans])
60
+ - Support for `CGI::Cookie` has been removed. ([#2332](https://github.com/rack/rack/pull/2332), [@ioquatix])
61
+
62
+ ### Fixed
63
+
64
+ - `Rack::RewindableInput::Middleware` no longer wraps a nil input. ([#2259](https://github.com/rack/rack/pull/2259), [@tt](https://github.com/tt))
65
+ - Fix `NoMethodError` in `Rack::Request#wrap_ipv6` when `x-forwarded-host` is empty. ([#2270](https://github.com/rack/rack/pull/2270), [@oieioi](https://github.com/oieioi))
66
+ - Fix the specification for `SERVER_PORT` which was incorrectly documented as required to be an `Integer` if present - it must be a `String` containing digits only. ([#2296](https://github.com/rack/rack/pull/2296), [@ioquatix])
67
+ - `SERVER_NAME` and `HTTP_HOST` are now more strictly validated according to the relevant specifications. ([#2298](https://github.com/rack/rack/pull/2298), [@ioquatix])
68
+ - `Rack::Lint` now disallows `PATH_INFO="" SCRIPT_NAME=""`. ([#2298](https://github.com/rack/rack/issues/2307), [@jeremyevans])
69
+
70
+ ## [3.1.17] - 2025-10-07
71
+
72
+ ### Security
73
+
74
+ - [CVE-2025-61772](https://github.com/advisories/GHSA-wpv5-97wm-hp9c) Multipart parser buffers unbounded per-part headers, enabling DoS (memory exhaustion)
75
+ - [CVE-2025-61771](https://github.com/advisories/GHSA-w9pc-fmgc-vxvw) Multipart parser buffers large non‑file fields entirely in memory, enabling DoS (memory exhaustion)
76
+ - [CVE-2025-61770](https://github.com/advisories/GHSA-p543-xpfm-54cp) Unbounded multipart preamble buffering enables DoS (memory exhaustion)
77
+
78
+ ## [3.1.16] - 2025-06-04
79
+
80
+ ### Security
81
+
82
+ - [CVE-2025-49007](https://github.com/advisories/GHSA-47m2-26rw-j2jw) Fix ReDoS in multipart request.
83
+
5
84
  ## [3.1.15] - 2025-05-18
6
85
 
7
86
  - Optional support for `CGI::Cookie` if not available. ([#2327](https://github.com/rack/rack/pull/2327), [#2333](https://github.com/rack/rack/pull/2333), [@earlopain])
8
87
 
9
88
  ## [3.1.14] - 2025-05-06
10
89
 
90
+ :warning: **This release includes a security fix that may cause certain routes in previously working applications to fail if query parameters exceed 4,096 in count or 4 MB in total size. See <https://github.com/rack/rack/discussions/2356> for more details.**
91
+
11
92
  ### Security
12
93
 
13
94
  - [CVE-2025-46727](https://github.com/rack/rack/security/advisories/GHSA-gjh7-p2fx-99vx) Unbounded parameter parsing in `Rack::QueryParser` can lead to memory exhaustion.
@@ -92,7 +173,7 @@ All notable changes to this project will be documented in this file. For info on
92
173
 
93
174
  :warning: **This release includes several breaking changes.** Refer to the **Removed** section below for the list of deprecated methods that have been removed in this release.
94
175
 
95
- Rack v3.1 is primarily a maintenance release that removes features deprecated in Rack v3.0. Alongside these removals, there are several improvements to the Rack SPEC, mainly focused on enhancing input and output handling. These changes aim to make Rack more efficient and align better with the requirements of server implementations and relevant HTTP specifications.
176
+ This release is primarily a maintenance release that removes features deprecated in Rack v3.0. Alongside these removals, there are several improvements to the Rack SPEC, mainly focused on enhancing input and output handling. These changes aim to make Rack more efficient and align better with the requirements of server implementations and relevant HTTP specifications.
96
177
 
97
178
  ### SPEC Changes
98
179
 
@@ -153,6 +234,8 @@ Rack v3.1 is primarily a maintenance release that removes features deprecated in
153
234
 
154
235
  ## [3.0.16] - 2025-05-06
155
236
 
237
+ :warning: **This release includes a security fix that may cause certain routes in previously working applications to fail if query parameters exceed 4,096 in count or 4 MB in total size. See <https://github.com/rack/rack/discussions/2356> for more details.**
238
+
156
239
  ### Security
157
240
 
158
241
  - [CVE-2025-46727](https://github.com/rack/rack/security/advisories/GHSA-gjh7-p2fx-99vx) Unbounded parameter parsing in `Rack::QueryParser` can lead to memory exhaustion.
@@ -271,6 +354,8 @@ Rack v3.1 is primarily a maintenance release that removes features deprecated in
271
354
 
272
355
  ## [3.0.0] - 2022-09-06
273
356
 
357
+ This release introduces major improvements to Rack, including enhanced support for streaming responses, expanded protocol handling, and stricter compliance with HTTP standards. It refines middleware interfaces, improves multipart and hijack handling, and strengthens security and error reporting. The update also brings performance optimizations, better compatibility with modern Ruby versions, and numerous bug fixes, making Rack more robust and flexible for web application development.
358
+
274
359
  - No changes
275
360
 
276
361
  ## [3.0.0.rc1] - 2022-09-04
@@ -359,6 +444,24 @@ Rack v3.1 is primarily a maintenance release that removes features deprecated in
359
444
  - 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))
360
445
  - `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))
361
446
 
447
+ ## [2.2.19] - 2025-10-07
448
+
449
+ ### Security
450
+
451
+ - [CVE-2025-61772](https://github.com/advisories/GHSA-wpv5-97wm-hp9c) Multipart parser buffers unbounded per-part headers, enabling DoS (memory exhaustion)
452
+ - [CVE-2025-61771](https://github.com/advisories/GHSA-w9pc-fmgc-vxvw) Multipart parser buffers large non‑file fields entirely in memory, enabling DoS (memory exhaustion)
453
+ - [CVE-2025-61770](https://github.com/advisories/GHSA-p543-xpfm-54cp) Unbounded multipart preamble buffering enables DoS (memory exhaustion)
454
+
455
+ ## [2.2.18] - 2025-09-25
456
+
457
+ ### Security
458
+
459
+ - [CVE-2025-59830](https://github.com/rack/rack/security/advisories/GHSA-625h-95r8-8xpm) Unbounded parameter parsing in `Rack::QueryParser` can lead to memory exhaustion via semicolon-separated parameters.
460
+
461
+ ## [2.2.17] - 2025-06-03
462
+
463
+ - Backport `Rack::MediaType#params` now handles parameters without values. ([#2263](https://github.com/rack/rack/pull/2263), [@AllyMarthaJ](https://github.com/AllyMarthaJ))
464
+
362
465
  ## [2.2.16] - 2025-05-22
363
466
 
364
467
  - Fix incorrect backport of optional `CGI::Cookie` support. ([#2335](https://github.com/rack/rack/pull/2335), [@jeremyevans])
@@ -369,6 +472,8 @@ Rack v3.1 is primarily a maintenance release that removes features deprecated in
369
472
 
370
473
  ## [2.2.14] - 2025-05-06
371
474
 
475
+ :warning: **This release includes a security fix that may cause certain routes in previously working applications to fail if query parameters exceed 4,096 in count or 4 MB in total size. See <https://github.com/rack/rack/discussions/2356> for more details.**
476
+
372
477
  ### Security
373
478
 
374
479
  - [CVE-2025-46727](https://github.com/rack/rack/security/advisories/GHSA-gjh7-p2fx-99vx) Unbounded parameter parsing in `Rack::QueryParser` can lead to memory exhaustion.
@@ -1155,3 +1260,5 @@ Items below this line are from the previously maintained HISTORY.md and NEWS.md
1155
1260
  [@BlakeWilliams]: https://github.com/BlakeWilliams "Blake Williams"
1156
1261
  [@davidstosik]: https://github.com/davidstosik "David Stosik"
1157
1262
  [@earlopain]: https://github.com/earlopain "Earlopain"
1263
+ [@wynksaiddestroy]: https://github.com/wynksaiddestroy "Fabian Winkler"
1264
+ [@matthewd]: https://github.com/matthewd "Matthew Draper"
data/README.md CHANGED
@@ -6,26 +6,43 @@ way possible, it unifies and distills the bridge between web servers, web
6
6
  frameworks, and web application into a single method call.
7
7
 
8
8
  The exact details of this are described in the [Rack Specification], which all
9
- Rack applications should conform to.
9
+ Rack applications should conform to. Browse the [Documentation] for more
10
+ information.
10
11
 
11
12
  ## Version support
12
13
 
13
14
  | Version | Support |
14
15
  |----------|------------------------------------|
15
- | 3.0.x | Bug fixes and security patches. |
16
+ | 3.2.x | Bug fixes and security patches. |
17
+ | 3.1.x | Security patches only. |
18
+ | 3.0.x | End of support. |
16
19
  | 2.2.x | Security patches only. |
17
20
  | <= 2.1.x | End of support. |
18
21
 
22
+ **Rack 2.2.x is in security maintenance mode**. Please upgrade to Rack 3.1+ as soon
23
+ as possible to ensure you are receiving the latest features and security patches.
24
+
19
25
  Please see the [Security Policy] for more information.
20
26
 
21
- ## Rack 3.0
27
+ ## Change log
28
+
29
+ See the [Changelog](CHANGELOG.md) for a detailed list of changes in each version of Rack.
30
+
31
+ ### Rack 3.2 (latest release)
32
+
33
+ This version of rack contains bug fixes and security patches.
34
+
35
+ ### Rack 3.1
22
36
 
23
- This is the latest version of Rack. It contains API improvements but also some
24
- breaking changes. Please check the [Upgrade Guide](UPGRADE-GUIDE.md) for more
25
- details about migrating servers, middlewares and applications designed for Rack 2
26
- to Rack 3. For detailed information on specific changes, check the [Change Log](CHANGELOG.md).
37
+ This version of rack contains bug fixes and security patches.
27
38
 
28
- ## Rack 2.2
39
+ ### Rack 3.0
40
+
41
+ This version of rack contains significant changes which are detailed in the
42
+ [Upgrade Guide](UPGRADE-GUIDE.md). It is recommended to upgrade to Rack 3 as soon
43
+ as possible to receive the latest features and security patches.
44
+
45
+ ### Rack 2.2
29
46
 
30
47
  This version of Rack is receiving security patches only, and effort should be
31
48
  made to move to Rack 3.
@@ -69,6 +86,8 @@ server](#supported-web-servers).
69
86
  ```bash
70
87
  $ gem install rackup
71
88
  $ rackup
89
+
90
+ # In another shell:
72
91
  $ curl http://localhost:9292
73
92
  Hello World
74
93
  ```
@@ -83,6 +102,7 @@ Rack is supported by a wide range of servers, including:
83
102
  * [NGINX Unit](https://unit.nginx.org/)
84
103
  * [Phusion Passenger](https://www.phusionpassenger.com/) (which is mod_rack for
85
104
  Apache and for nginx)
105
+ * [Pitchfork](https://github.com/Shopify/pitchfork)
86
106
  * [Puma](https://puma.io/)
87
107
  * [Thin](https://github.com/macournoyer/thin)
88
108
  * [Unicorn](https://yhbt.net/unicorn/)
@@ -132,11 +152,9 @@ middleware:
132
152
  * `Rack::ETag` for setting `etag` header on bodies that can be buffered.
133
153
  * `Rack::Events` for providing easy hooks when a request is received and when
134
154
  the response is sent.
135
- * `Rack::Files` for serving static files.
136
155
  * `Rack::Head` for returning an empty body for HEAD requests.
137
156
  * `Rack::Lint` for checking conformance to the [Rack Specification].
138
157
  * `Rack::Lock` for serializing requests using a mutex.
139
- * `Rack::Logger` for setting a logger to handle logging errors.
140
158
  * `Rack::MethodOverride` for modifying the request method based on a submitted
141
159
  parameter.
142
160
  * `Rack::Recursive` for including data from other paths in the application, and
@@ -150,7 +168,7 @@ middleware:
150
168
  a nice and helpful way with clickable backtrace.
151
169
  * `Rack::ShowStatus` for using nice error pages for empty client error
152
170
  responses.
153
- * `Rack::Static` for more configurable serving of static files.
171
+ * `Rack::Static` for configurable serving of static files.
154
172
  * `Rack::TempfileReaper` for removing temporary files creating during a request.
155
173
 
156
174
  All these components use the same interface, which is described in detail in the
@@ -172,6 +190,8 @@ quickly and without doing the same web stuff all over:
172
190
  returns a not found or method not supported response.
173
191
  * `Rack::Directory` for serving files under a given directory, with directory
174
192
  indexes.
193
+ * `Rack::Files` for serving files under a given directory, without directory
194
+ indexes.
175
195
  * `Rack::MediaType` for parsing content-type headers.
176
196
  * `Rack::Mime` for determining content-type based on file extension.
177
197
  * `Rack::RewindableInput` for making any IO object rewindable, using a temporary
@@ -210,6 +230,14 @@ query string, before attempting parsing, so if the same parameter key is
210
230
  used multiple times in the query, each counts as a separate parameter for
211
231
  this check.
212
232
 
233
+ ### `RACK_MULTIPART_BUFFERED_UPLOAD_BYTESIZE_LIMIT`
234
+
235
+ This environment variable sets the maximum amount of memory Rack will use
236
+ to buffer multipart parameters when parsing a request body. This considers
237
+ the size of the multipart mime headers and the body part for multipart
238
+ parameters that are buffered in memory and do not use tempfiles. This
239
+ defaults to 16MB if not provided.
240
+
213
241
  ### `param_depth_limit`
214
242
 
215
243
  ```ruby
@@ -247,7 +275,6 @@ Can also be set via the `RACK_MULTIPART_FILE_LIMIT` environment variable.
247
275
 
248
276
  (This is also aliased as `multipart_part_limit` and `RACK_MULTIPART_PART_LIMIT` for compatibility)
249
277
 
250
-
251
278
  ### `multipart_total_part_limit`
252
279
 
253
280
  The maximum total number of parts a request can contain of any type, including
@@ -260,18 +287,12 @@ Set to 0 for no limit.
260
287
 
261
288
  Can also be set via the `RACK_MULTIPART_TOTAL_PART_LIMIT` environment variable.
262
289
 
263
-
264
- ## Changelog
265
-
266
- See [CHANGELOG.md](CHANGELOG.md).
267
-
268
290
  ## Contributing
269
291
 
270
292
  See [CONTRIBUTING.md](CONTRIBUTING.md) for specific details about how to make a
271
293
  contribution to Rack.
272
294
 
273
- Please post bugs, suggestions and patches to [GitHub
274
- Issues](https://github.com/rack/rack/issues).
295
+ Please post bugs, suggestions and patches to [GitHub Issues](https://github.com/rack/rack/issues).
275
296
 
276
297
  Please check our [Security Policy](https://github.com/rack/rack/security/policy)
277
298
  for responsible disclosure and security bug reporting process. Due to wide usage
@@ -281,6 +302,13 @@ is greatly appreciated.
281
302
 
282
303
  ## See Also
283
304
 
305
+ ### `rackup`
306
+
307
+ A useful tool for running Rack applications from the command line, including
308
+ `Rackup::Server` (previously `Rack::Server`) for scripting servers.
309
+
310
+ * https://github.com/rack/rackup
311
+
284
312
  ### `rack-contrib`
285
313
 
286
314
  The plethora of useful middleware created the need for a project that collects
@@ -351,5 +379,6 @@ would like to thank:
351
379
 
352
380
  Rack is released under the [MIT License](MIT-LICENSE).
353
381
 
354
- [Rack Specification]: SPEC.rdoc
382
+ [Rack Specification]: https://rack.github.io/rack/main/SPEC_rdoc.html
383
+ [Documentation]: https://rack.github.io/rack/
355
384
  [Security Policy]: SECURITY.md