-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Comparing changes
Open a pull request
base repository: rack/rack
base: v3.1.20
head repository: rack/rack
compare: v3.1.21
- 19 commits
- 19 files changed
- 6 contributors
Commits on Mar 30, 2026
-
Configuration menu - View commit details
-
Copy full SHA for f7e6c57 - Browse repository at this point
Copy the full SHA f7e6c57View commit details
Commits on Mar 31, 2026
-
Root directory disclosure via unescaped regex interpolation in `Rack:…
…:Directory`. Escape the root path before interpolating into a regular expression, preventing RegexpError when the root contains metacharacters and avoiding path disclosure when regex silently mismatches.
Configuration menu - View commit details
-
Copy full SHA for 29b17c5 - Browse repository at this point
Copy the full SHA 29b17c5View commit details -
Avoid O(n^2) algorithm in Rack::Utils.select_best_encoding
If a wildcard has already been seen as an acceptable encoding, ignore additional wildcards. Other improvements while here: * Only process up to 16 encodings. * Improve efficiency of candidate sorting. Add tests for: * Lower but non-zero wildcard priority * Multiple wildcards with different priorities
Configuration menu - View commit details
-
Copy full SHA for 55db26e - Browse repository at this point
Copy the full SHA 55db26eView commit details -
Parse Forwarded header instead of using regexp scan
`;` and `,` are allowed as characters inside a quoted value of a forwarded parameter. So you cannot safely split on those and then try to remove quotes. Switch to using a parser based on the one used for parsing multipart content-disposition.
Configuration menu - View commit details
-
Copy full SHA for 9df5d34 - Browse repository at this point
Copy the full SHA 9df5d34View commit details -
Raise error for multipart requests with multiple boundary parameters
RFC 1341 specifies there should be a single boundary parameter. Requests with multiple boundary parameters are unlikely to be legitimate, and likely are attempts to exploit parsing differences between rack and web application firewalls. * Disallow whitespace between boundary and = when parsing multipart boundaries Rack has historically not accepted these. To avoid security issues when parsing multiple boundaries, check for boundary cases that may have whitespace, but explicitly disallow the parsing if there is whitespace.
Configuration menu - View commit details
-
Copy full SHA for 1062653 - Browse repository at this point
Copy the full SHA 1062653View commit details -
Fix
header_rulesbypass via URL-encoded paths.Decode path once in applicable_rules before matching, fixing: - URL-encoded paths bypassing :fonts, Array, and Regexp header rules. - Path mutation across rules when String rule unescapes inside find_all. - Array rule values interpolated into regexp without Regexp.escape.
Configuration menu - View commit details
-
Copy full SHA for 84937c3 - Browse repository at this point
Copy the full SHA 84937c3View commit details -
Use
String#bytesizeforContent-Lengthin error responses.`String#size` returns character count, not byte count. For responses containing multi-byte UTF-8 characters, this produces an incorrect `Content-Length` value, violating RFC 9110 Section 8.6.
Configuration menu - View commit details
-
Copy full SHA for c3645d3 - Browse repository at this point
Copy the full SHA c3645d3View commit details
Commits on Apr 1, 2026
-
Use a default limit of 100 byte ranges
Allow exceeding this limit by passing max_ranges keyword argument. If the limit is exceeded, return nil, treating the request as not requesting ranges. This seems better than returning [], which would treat the request as requesting no ranges. We use [] when the total size exceeds the size of the file, as such case is obviously a problem. However, a request with more than the given number of ranges is not obviously a problem.
Configuration menu - View commit details
-
Copy full SHA for 345a4cf - Browse repository at this point
Copy the full SHA 345a4cfView commit details -
Change Rack::Request::AUTHORITY to only match RFC allowed characters
RFC 9110 specifies that allowed characters in a Host header come from RFC 3986 Section 3.2.2, which provides the following ABNF: ``` host = IP-literal / IPv4address / reg-name reg-name = *( unreserved / pct-encoded / sub-delims ) unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" pct-encoded = "%" HEXDIG HEXDIG sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" ``` This limits the allowed characters to those characters. This breaks a spec that tests for internationalized domain names. Such a spec is incorrect as internationalized domain names must be encoded via punycode in Host headers, so update the specs to correctly test for the punycode versions.Configuration menu - View commit details
-
Copy full SHA for c49558a - Browse repository at this point
Copy the full SHA c49558aView commit details -
Only do a simple substitution on the x-accel-mapping paths
Mention the substitution is case insensitive in the documentation, since if the file system is case sensitive, this would be unexpected.
Configuration menu - View commit details
-
Copy full SHA for 59a0966 - Browse repository at this point
Copy the full SHA 59a0966View commit details -
Fix root prefix bug in Rack::Static
This is similar to the fix of CVE-2026-22860 for Rack::Directory.
Configuration menu - View commit details
-
Copy full SHA for a17cb99 - Browse repository at this point
Copy the full SHA a17cb99View commit details -
Add Content-Length size check in Rack::Multipart::Parser
Compare the declared `Content-Length` against a configurable maximum (`PARSER_BYTESIZE_LIMIT`) before any parsing begins. If it exceeds the limit, raise an exception immediately.
Configuration menu - View commit details
-
Copy full SHA for 367a2a0 - Browse repository at this point
Copy the full SHA 367a2a0View commit details -
Limit the number of quoted escapes during multipart parsing
This sets a default limit of 8192 escapes, which can be modified using the RACK_MULTIPART_CONTENT_DISPOSITION_QUOTED_ESCAPES_LIMIT environment variable.
Configuration menu - View commit details
-
Copy full SHA for 17ce783 - Browse repository at this point
Copy the full SHA 17ce783View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2856934 - Browse repository at this point
Copy the full SHA 2856934View commit details -
Configuration menu - View commit details
-
Copy full SHA for 176f468 - Browse repository at this point
Copy the full SHA 176f468View commit details -
Configuration menu - View commit details
-
Copy full SHA for c59d924 - Browse repository at this point
Copy the full SHA c59d924View commit details -
Configuration menu - View commit details
-
Copy full SHA for fd1c23d - Browse repository at this point
Copy the full SHA fd1c23dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 87961c3 - Browse repository at this point
Copy the full SHA 87961c3View commit details -
Configuration menu - View commit details
-
Copy full SHA for ae84311 - Browse repository at this point
Copy the full SHA ae84311View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v3.1.20...v3.1.21