rack 3.1.8 → 3.1.10
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 +14 -0
- data/lib/rack/common_logger.rb +3 -2
- data/lib/rack/media_type.rb +8 -3
- data/lib/rack/version.rb +1 -1
- metadata +3 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58b45f32cc72a649a82bc9aab409e575e4b3b9acb373a7e5015fa6b5fd948845
|
4
|
+
data.tar.gz: 181f48f799ffa1b64a90b6b1d4bcdb1e9af8b9b10bf72cee2a637e4dd0b7c317
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8657201de040d14a5e345bc2d3b7aa9f58751b9f1c7f14c95c9dbc3cc96a50ce566f544be3464920845b0d0e88a283853c397646546beb1ba7d6c15ab54b490d
|
7
|
+
data.tar.gz: 36bca618d65a42de84c660f82c50d1aed0e809f0ac44665abcfc546405a5548850dfc9d129580254dcef3f77d4c057c9c2e24462ac2f4f3b6e7104ffe0f46a08
|
data/CHANGELOG.md
CHANGED
@@ -2,8 +2,22 @@
|
|
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.10] - 2025-02-12
|
6
|
+
|
7
|
+
### Security
|
8
|
+
|
9
|
+
- [CVE-2025-25184](https://github.com/rack/rack/security/advisories/GHSA-7g2v-jj9q-g3rg) Possible Log Injection in Rack::CommonLogger.
|
10
|
+
|
11
|
+
## [3.1.9] - 2025-01-31
|
12
|
+
|
13
|
+
### Fixed
|
14
|
+
|
15
|
+
- `Rack::MediaType#params` now handles parameters without values. ([#2263](https://github.com/rack/rack/pull/2263), [@AllyMarthaJ](https://github.com/AllyMarthaJ))
|
16
|
+
|
5
17
|
## [3.1.8] - 2024-10-14
|
6
18
|
|
19
|
+
### Fixed
|
20
|
+
|
7
21
|
- Resolve deprecation warnings about uri `DEFAULT_PARSER`. ([#2249](https://github.com/rack/rack/pull/2249), [@earlopain])
|
8
22
|
|
9
23
|
## [3.1.7] - 2024-07-11
|
data/lib/rack/common_logger.rb
CHANGED
@@ -20,7 +20,7 @@ module Rack
|
|
20
20
|
# The actual format is slightly different than the above due to the
|
21
21
|
# separation of SCRIPT_NAME and PATH_INFO, and because the elapsed
|
22
22
|
# time in seconds is included at the end.
|
23
|
-
FORMAT = %{%s - %s [%s] "%s %s%s%s %s" %d %s %0.4f
|
23
|
+
FORMAT = %{%s - %s [%s] "%s %s%s%s %s" %d %s %0.4f }
|
24
24
|
|
25
25
|
# +logger+ can be any object that supports the +write+ or +<<+ methods,
|
26
26
|
# which includes the standard library Logger. These methods are called
|
@@ -66,7 +66,8 @@ module Rack
|
|
66
66
|
length,
|
67
67
|
Utils.clock_time - began_at)
|
68
68
|
|
69
|
-
msg.gsub!(/[^[:print:]
|
69
|
+
msg.gsub!(/[^[:print:]]/) { |c| sprintf("\\x%x", c.ord) }
|
70
|
+
msg[-1] = "\n"
|
70
71
|
|
71
72
|
logger = @logger || request.get_header(RACK_ERRORS)
|
72
73
|
# Standard library logger doesn't support write but it supports << which actually
|
data/lib/rack/media_type.rb
CHANGED
@@ -27,6 +27,11 @@ module Rack
|
|
27
27
|
# provided. e.g., when the CONTENT_TYPE is "text/plain;charset=utf-8",
|
28
28
|
# this method responds with the following Hash:
|
29
29
|
# { 'charset' => 'utf-8' }
|
30
|
+
#
|
31
|
+
# This will pass back parameters with empty strings in the hash if they
|
32
|
+
# lack a value (e.g., "text/plain;charset=" will return { 'charset' => '' },
|
33
|
+
# and "text/plain;charset" will return { 'charset' => '' }, similarly to
|
34
|
+
# the query params parser (barring the latter case, which returns nil instead)).
|
30
35
|
def params(content_type)
|
31
36
|
return {} if content_type.nil?
|
32
37
|
|
@@ -40,9 +45,9 @@ module Rack
|
|
40
45
|
|
41
46
|
private
|
42
47
|
|
43
|
-
|
44
|
-
|
45
|
-
|
48
|
+
def strip_doublequotes(str)
|
49
|
+
(str && str.start_with?('"') && str.end_with?('"')) ? str[1..-2] : str || ''
|
50
|
+
end
|
46
51
|
end
|
47
52
|
end
|
48
53
|
end
|
data/lib/rack/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
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.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leah Neukirchen
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-02-12 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: minitest
|
@@ -143,7 +142,6 @@ metadata:
|
|
143
142
|
changelog_uri: https://github.com/rack/rack/blob/main/CHANGELOG.md
|
144
143
|
documentation_uri: https://rubydoc.info/github/rack/rack
|
145
144
|
source_code_uri: https://github.com/rack/rack
|
146
|
-
post_install_message:
|
147
145
|
rdoc_options: []
|
148
146
|
require_paths:
|
149
147
|
- lib
|
@@ -158,8 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
156
|
- !ruby/object:Gem::Version
|
159
157
|
version: '0'
|
160
158
|
requirements: []
|
161
|
-
rubygems_version: 3.
|
162
|
-
signing_key:
|
159
|
+
rubygems_version: 3.6.2
|
163
160
|
specification_version: 4
|
164
161
|
summary: A modular Ruby webserver interface.
|
165
162
|
test_files: []
|