Skip to content

Bump sinatra from 4.2.1 to 4.2.2 - #443

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/bundler/sinatra-4.2.2
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/bundler/sinatra-4.2.2

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 20, 2026

Copy link
Copy Markdown
Contributor

Bumps sinatra from 4.2.1 to 4.2.2.

Changelog

Sourced from sinatra's changelog.

4.2.2 / 2026-11-17

  • Fix: Require a dot before the domain for leading-dot permitted_hosts in Rack::Protection::HostAuthorization

    • .example.org no longer permits hosts that only end in example.org, like evilexample.org
  • Fix: Do not treat a missing Referer as same-origin when Sec-Fetch-Site says the request is cross-site or same-site

    • Affects RemoteToken, JsonCsrf and RemoteReferrer in Rack::Protection
    • Requests with neither header are accepted as before, allow_empty_referrer still defaults to true
  • Fix: Rack::Protection::CookieTossing no longer rejects all requests after one with duplicate session cookies

  • Docs: Document that static files are served through symlinks pointing outside public_folder

  • Fix: Sinatra::QuietLogger no longer hides requests that are routed outside the quiet prefixes

    • /images/../admin is routed to /admin, so it is now logged even with images as a quiet prefix
  • Fix: Set Strict-Transport-Security and Referrer-Policy on responses rejected by other protections

    • Only for apps that use strict_transport or referrer_policy, neither is enabled by default
    • Responses rejected by AuthenticityToken, FormToken or CookieTossing now have both headers, those rejected by RemoteReferrer or SessionHijacking now have Strict-Transport-Security
    • Requests are accepted and rejected as before, so nothing changes with the drop_session reaction, the default in Sinatra, as it does not reject requests
    • A header already set on the response is kept
  • Fix: Run Rack::Protection::PathTraversal before the other protections

    • All protections now see the normalized path, the one the app routes on, where some saw the path as it was sent
    • Only requests with a path that gets normalized are affected: . or .. segments, %2e, %2f, %5c, backslashes or repeated slashes
    • Check code written for the path as it was sent: an allow_if matching /webhooks/[^/]+ no longer matches /webhooks/a%2Fb, as it is called with /webhooks/a/b
    What Before After
    allow_if of AuthenticityToken, FormToken, HttpOrigin and JsonCsrf called with the path as it was sent called with the normalized path
    instrumenter of the protections that ran before PathTraversal notified with the path as it was sent notified with the normalized path
    Per-form tokens of AuthenticityToken and FormToken checked against the path as it was sent checked against the normalized path
    CookieTossing redirected to, and expired cookies for, the path as it was sent uses the normalized path
    RemoteToken, XSSHeader and middleware added with use saw the normalized path unchanged
  • Fix: rack-protection and sinatra-contrib used from a path source no longer fail to load after bundle cache (#2144)

  • Fix: Avoid "method redefined" warnings in Sinatra::Delegator (#2139)

Commits
  • ebcaff2 4.2.2 release
  • a13a321 Set policy headers on rejected responses
  • 1416df2 Normalize the path before other protections run
  • 041cf95 Match the normalized path in QuietLogger
  • bc8830e Document that static files follow symlinks
  • 7813162 Keep CookieTossing's bad cookies per request
  • 34b3bfd Honor Sec-Fetch-Site when the Referer is missing
  • f0e8cb3 Require a dot boundary for leading-dot hosts
  • c297ef1 Test that invalid capture names don't compile
  • 055fa77 Pin commonmarker to 2.0.1 on Ruby 3.1
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [sinatra](https://github.com/sinatra/sinatra) from 4.2.1 to 4.2.2.
- [Changelog](https://github.com/sinatra/sinatra/blob/main/CHANGELOG.md)
- [Commits](sinatra/sinatra@v4.2.1...v4.2.2)

---
updated-dependencies:
- dependency-name: sinatra
  dependency-version: 4.2.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants