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)
Configuration
📅Schedule: (in timezone Europe/Bratislava)
Branch creation
At any time (no schedule defined)
Automerge
At any time (no schedule defined)
🚦Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕Ignore: Close this PR and you won't be reminded about this update again.
If you want to rebase/retry this PR, check this box
This PR contains the following updates:
| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [sinatra-contrib](http://sinatrarb.com/contrib/) ([source](https://github.com/sinatra/sinatra/tree/HEAD/sinatra-contrib)) | `4.2.1` → `4.2.2` |  |  |
---
### Release Notes
<details>
<summary>sinatra/sinatra (sinatra-contrib)</summary>
### [`v4.2.2`](https://github.com/sinatra/sinatra/blob/HEAD/CHANGELOG.md#422--2026-11-17)
[Compare Source](https://github.com/sinatra/sinatra/compare/v4.2.1...v4.2.2)
- 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](https://github.com/sinatra/sinatra/pull/2144))
- Fix: Avoid "method redefined" warnings in `Sinatra::Delegator` ([#​2139](https://github.com/sinatra/sinatra/pull/2139))
</details>
---
### Configuration
📅 **Schedule**: (in timezone Europe/Bratislava)
- Branch creation
- At any time (no schedule defined)
- Automerge
- At any time (no schedule defined)
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yMDkuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjIwOS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
randy
changed title from Update dependency sinatra-contrib to v4.2.2 to Update dependency sinatra-contrib to v4.2.2 - autoclosed2026-11-17 23:28:14 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This PR contains the following updates:
4.2.1→4.2.2Release Notes
sinatra/sinatra (sinatra-contrib)
v4.2.2Compare Source
Fix: Require a dot before the domain for leading-dot
permitted_hostsinRack::Protection::HostAuthorization.example.orgno longer permits hosts that only end inexample.org, likeevilexample.orgFix: Do not treat a missing
Refereras same-origin whenSec-Fetch-Sitesays the request is cross-site or same-siteRemoteToken,JsonCsrfandRemoteReferrerinRack::Protectionallow_empty_referrerstill defaults totrueFix:
Rack::Protection::CookieTossingno longer rejects all requests after one with duplicate session cookiesDocs: Document that static files are served through symlinks pointing outside
public_folderFix:
Sinatra::QuietLoggerno longer hides requests that are routed outside the quiet prefixes/images/../adminis routed to/admin, so it is now logged even withimagesas a quiet prefixFix: Set
Strict-Transport-SecurityandReferrer-Policyon responses rejected by other protectionsstrict_transportorreferrer_policy, neither is enabled by defaultAuthenticityToken,FormTokenorCookieTossingnow have both headers, those rejected byRemoteReferrerorSessionHijackingnow haveStrict-Transport-Securitydrop_sessionreaction, the default in Sinatra, as it does not reject requestsFix: Run
Rack::Protection::PathTraversalbefore the other protections.or..segments,%2e,%2f,%5c, backslashes or repeated slashesallow_ifmatching/webhooks/[^/]+no longer matches/webhooks/a%2Fb, as it is called with/webhooks/a/ballow_ifofAuthenticityToken,FormToken,HttpOriginandJsonCsrfinstrumenterof the protections that ran beforePathTraversalAuthenticityTokenandFormTokenCookieTossingRemoteToken,XSSHeaderand middleware added withuseFix:
rack-protectionandsinatra-contribused from a path source no longer fail to load afterbundle cache(#2144)Fix: Avoid "method redefined" warnings in
Sinatra::Delegator(#2139)Configuration
📅 Schedule: (in timezone Europe/Bratislava)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate CLI.
Update dependency sinatra-contrib to v4.2.2to Update dependency sinatra-contrib to v4.2.2 - autoclosedPull request closed