Skip to content

Bump omniauth from 2.3.1 to 2.4.0 - #518

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/bundler/omniauth-2.4.0
Closed

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/bundler/omniauth-2.4.0

Conversation

@dependabot

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

Copy link
Copy Markdown
Contributor

Bumps omniauth from 2.3.1 to 2.4.0.

Release notes

Sourced from omniauth's releases.

v2.4.0

Added

  • A strategy can store its own values for the callback in the sign-in it remembers, such as an OAuth 2.0 PKCE verifier, by passing them to remember_sign_in(key, data), and read them back in the callback from remembered_sign_in, which is nil when no sign-in is remembered for the callback's key. This lets omniauth-oauth2 keep one entry per sign-in instead of a second map that stores each state again. See the README. (omniauth-oauth2#195)

Changed

  • session['omniauth.sign_ins'] keeps the latest 3 sign-ins instead of 5, and each one stores less: no origin when there isn't one, and no params when they're empty or with more than 512 bytes in their keys and values, in which case OmniAuth logs a warning and the callback gets empty omniauth.params. With 5 sign-ins, each with a referer and params, a few abandoned sign-ins could overflow Rails' 4 KB cookie session and make the next one fail with ActionDispatch::Cookies::CookieOverflow. (omniauth-oauth2#195)

Fixed

  • Strategy#redirect no longer raises Encoding::CompatibilityError for a URI in an encoding that isn't ASCII-compatible, such as UTF-16 or UTF-32. The URI is transcoded to UTF-8 first, with invalid or unmappable characters replaced, so both the :iframe script and the 302 work.

Security

  • Strategy#redirect now escapes the target URI before interpolating it into the inline <script> emitted when the :iframe option is enabled. Previously the URI was written verbatim, so a value containing a quote, </script>, or a line terminator could break out of the JavaScript string literal and execute in the application's origin (CWE-116/79). The :iframe branch also only emits the script for an http(s) or relative/protocol-relative target; a javascript:, data:, or vbscript: URI (which escaping cannot neutralize) falls through to the ordinary 302, whose Location header is inert. The non-iframe branch now HTML-escapes the URI it writes into the 302 body, and both branches send a text/html Content-Type.
  • Strategy#store_origin now refuses to persist an omniauth.origin (from the origin param or the referer) whose scheme can run as script (javascript:, data:, vbscript:), so any code that later redirects to the stored origin can't execute it. Behavior change: an origin param with one of those schemes, or one that isn't a String (such as origin[]=...), is dropped and no longer falls back to the referer. Other schemes, including non-web deep links such as myapp:// used by mobile sign-in, are still stored.

Full Changelog: omniauth/omniauth@v2.3.1...v2.4.0

Changelog

Sourced from omniauth's changelog.

[2.4.0] - 2026-11-14

Added

  • A strategy can store its own values for the callback in the sign-in it remembers, such as an OAuth 2.0 PKCE verifier, by passing them to remember_sign_in(key, data), and read them back in the callback from remembered_sign_in, which is nil when no sign-in is remembered for the callback's key. This lets omniauth-oauth2 keep one entry per sign-in instead of a second map that stores each state again. See the README. (omniauth-oauth2#195)

Changed

  • session['omniauth.sign_ins'] keeps the latest 3 sign-ins instead of 5, and each one stores less: no origin when there isn't one, and no params when they're empty or with more than 512 bytes in their keys and values, in which case OmniAuth logs a warning and the callback gets empty omniauth.params. With 5 sign-ins, each with a referer and params, a few abandoned sign-ins could overflow Rails' 4 KB cookie session and make the next one fail with ActionDispatch::Cookies::CookieOverflow. (omniauth-oauth2#195)

Fixed

  • Strategy#redirect no longer raises Encoding::CompatibilityError for a URI in an encoding that isn't ASCII-compatible, such as UTF-16 or UTF-32. The URI is transcoded to UTF-8 first, with invalid or unmappable characters replaced, so both the :iframe script and the 302 work.

Security

  • Strategy#redirect now escapes the target URI before interpolating it into the inline <script> emitted when the :iframe option is enabled. Previously the URI was written verbatim, so a value containing a quote, </script>, or a line terminator could break out of the JavaScript string literal and execute in the application's origin (CWE-116/79). The :iframe branch also only emits the script for an http(s) or relative/protocol-relative target; a javascript:, data:, or vbscript: URI (which escaping cannot neutralize) falls through to the ordinary 302, whose Location header is inert. The non-iframe branch now HTML-escapes the URI it writes into the 302 body, and both branches send a text/html Content-Type.
  • Strategy#store_origin now refuses to persist an omniauth.origin (from the origin param or the referer) whose scheme can run as script (javascript:, data:, vbscript:), so any code that later redirects to the stored origin can't execute it. Behavior change: an origin param with one of those schemes, or one that isn't a String (such as origin[]=...), is dropped and no longer falls back to the referer. Other schemes, including non-web deep links such as myapp:// used by mobile sign-in, are still stored.
Commits
  • a2e6377 Release 2.4.0
  • f0c80cd Count sign-in params without building a query string
  • ddc302d Let strategies store their own data in each sign-in
  • a8fa253 Drop TruffleRuby 40.0 from the CI matrix
  • aa7b732 Transcode redirect URIs that aren't ASCII-compatible
  • 4e5fcde Address review: string-only origin, encoding-aware escaping, referer cleanup
  • ac85cc7 Address review: spec normalize_redirect_uri to kill guard mutants
  • 01e9e62 Address review: CGI.escapeHTML for 302 body, regexp scheme checks
  • 169e159 Address review: keep deep-link origins and binary redirect targets
  • ae90c53 Reject non-http(s) redirect schemes and escape the 302 body
  • 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 [omniauth](https://github.com/omniauth/omniauth) from 2.3.1 to 2.4.0.
- [Release notes](https://github.com/omniauth/omniauth/releases)
- [Changelog](https://github.com/omniauth/omniauth/blob/master/CHANGELOG.md)
- [Commits](omniauth/omniauth@v2.3.1...v2.4.0)

---
updated-dependencies:
- dependency-name: omniauth
  dependency-version: 2.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file ruby Pull requests that update ruby code labels Nov 17, 2026
@dependabot @github

dependabot Bot commented on behalf of github Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #519.

@dependabot dependabot Bot closed this Nov 18, 2026
@dependabot
dependabot Bot deleted the dependabot/bundler/omniauth-2.4.0 branch November 18, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file ruby Pull requests that update ruby code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants