Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rack/rack
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.2.5
Choose a base ref
...
head repository: rack/rack
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.2.6
Choose a head ref
  • 19 commits
  • 18 files changed
  • 6 contributors

Commits on Mar 31, 2026

  1. Configuration menu
    Copy the full SHA
    549a135 View commit details
    Browse the repository at this point in the history
  2. 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.
    ioquatix committed Mar 31, 2026
    Configuration menu
    Copy the full SHA
    459ea1f View commit details
    Browse the repository at this point in the history
  3. 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
    jeremyevans authored and ioquatix committed Mar 31, 2026
    Configuration menu
    Copy the full SHA
    8bf0c2e View commit details
    Browse the repository at this point in the history
  4. 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.
    ioquatix committed Mar 31, 2026
    Configuration menu
    Copy the full SHA
    27e06c6 View commit details
    Browse the repository at this point in the history
  5. 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.
    jeremyevans authored and ioquatix committed Mar 31, 2026
    Configuration menu
    Copy the full SHA
    1c0b723 View commit details
    Browse the repository at this point in the history
  6. Fix header_rules bypass 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.
    haruki0409 authored and ioquatix committed Mar 31, 2026
    Configuration menu
    Copy the full SHA
    d6af063 View commit details
    Browse the repository at this point in the history
  7. Use String#bytesize for Content-Length in 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.
    ioquatix committed Mar 31, 2026
    Configuration menu
    Copy the full SHA
    10ecd9a View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2026

  1. 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.
    jeremyevans authored and ioquatix committed Apr 1, 2026
    Configuration menu
    Copy the full SHA
    9138756 View commit details
    Browse the repository at this point in the history
  2. 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.
    jeremyevans authored and ioquatix committed Apr 1, 2026
    Configuration menu
    Copy the full SHA
    2246626 View commit details
    Browse the repository at this point in the history
  3. 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.
    jeremyevans authored and ioquatix committed Apr 1, 2026
    Configuration menu
    Copy the full SHA
    a57bc14 View commit details
    Browse the repository at this point in the history
  4. Fix root prefix bug in Rack::Static

    This is similar to the fix of CVE-2026-22860 for Rack::Directory.
    jeremyevans authored and ioquatix committed Apr 1, 2026
    Configuration menu
    Copy the full SHA
    7a8f326 View commit details
    Browse the repository at this point in the history
  5. 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.
    th4s1s authored and ioquatix committed Apr 1, 2026
    Configuration menu
    Copy the full SHA
    b3e5945 View commit details
    Browse the repository at this point in the history
  6. 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.
    jeremyevans authored and ioquatix committed Apr 1, 2026
    Configuration menu
    Copy the full SHA
    bfb6914 View commit details
    Browse the repository at this point in the history
  7. Implement OBS unfolding for multipart requests per RFC 5322 2.2.3

    Do this for both the Content-Disposition and Content-Type lines.
    
    Co-authored-by: "William T. Nelson" <[email protected]>
    2 people authored and ioquatix committed Apr 1, 2026
    Configuration menu
    Copy the full SHA
    d50c4d3 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    bf83042 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    8f425de View commit details
    Browse the repository at this point in the history
  10. Fix test expectation.

    samuel-williams-shopify authored and ioquatix committed Apr 1, 2026
    Configuration menu
    Copy the full SHA
    d268165 View commit details
    Browse the repository at this point in the history
  11. Fix typo in test.

    ioquatix committed Apr 1, 2026
    Configuration menu
    Copy the full SHA
    31989fd View commit details
    Browse the repository at this point in the history
  12. Bump patch version.

    ioquatix committed Apr 1, 2026
    Configuration menu
    Copy the full SHA
    e1f22fd View commit details
    Browse the repository at this point in the history
Loading