Repository navigation
Update dependency activesupport to v8 [SECURITY] - #2126
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
7.2.3.2→8.0.5.2Active Support: Possible DoS vulnerability in Active Support safe_constantize
CVE-2026-126080 / GHSA-8474-xrp6-wh69
More information
Details
Impact
When constant lookup raises
LoadError,ActiveSupport::Inflector#safe_constantize(andString#safe_constantize) builds a regular expression from the requested constant name without escaping it, so a caller that passes untrusted input lets the attacker choose the source of a pattern that the application compiles. Crafted patterns can trigger defects in Ruby's regular expression compiler, possibly leading to a crash of the server process, and repeated requests could keep the application unavailable.Action Cable passes the
channelvalue of eachsubscribecommand tosafe_constantizebefore any channel lookup, so in the default configuration an unauthenticated client of the Action Cable endpoint can reach this code.Details
The check that decides whether
safe_constantizereturnsnilor re-raises theLoadErrornow matches the first segment of the constant name against the error message as a literal string, and no longer compiles a regular expression. It returns the same result as before for constant names that contain no regular expression syntax.Affected applications
An application is affected if it meets all of these requirements:
/cable(config.action_cable.mount_path), or otherwise passes untrusted input tosafe_constantize.ApplicationCable::Connection#connectauthenticates nobody unless the application adds a check.Workarounds
Applications that do not use Action Cable can set
config.action_cable.mount_path = nilto remove the endpoint. Applications that use Action Cable can callreject_unauthorized_connectioninApplicationCable::Connection#connectfor unauthenticated clients, which limits exposure to authenticated users but does not remove it.Releases
The fixed releases are available at the normal locations.
Patches for those who cannot upgrade at once:
Versions affected
Credit
This issue was responsibly reported by Felix Tscheulin (flixt) through HackerOne researcher scheja, and independently by Bucky Wolfe (Igneous), who provided a proof of concept that crashes the server. It was also found by the Anthropic OSS Scanner (ANT-2026-ZUN5KU3Q).
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
rails/rails (activesupport)
v8.0.5.2: 8.0.5.2Compare Source
Active Support
ActiveSupport::Inflector#safe_constantizematches the constant name in aLoadErrormessage as a literal string instead of building aRegexpfrom it.
The name's segments were interpolated unescaped into the pattern, so input
that reaches
safe_constantize, such as the channel identifier in an ActionCable subscribe command, chose the source passed to the regexp compiler.
[GHSA-8474-xrp6-wh69]
Jeremy Daer
Active Model
Active Record
Action View
Skip attribute names in tag helpers that are blank once converted to a
string.
A Symbol such as
:" "is not blank, becauseSymbol#blank?isSymbol#empty?, so it reached the escaping step and produced an attributewith no name. The asset helpers symbolize their keys, so an ordinary String
key reached the same place.
[GHSA-68p9-83h6-5wpj]
Mike Dalessio
Fix
strip_tagsto encode"and'in its output.strip_tagsreturns anhtml_safestring, but was not encoding quotationmarks. The method now encodes all five HTML-significant characters (
&,<,>,",'), consistent with the existinghtml_safeconvention.Output used outside HTML, such as in a text template or JSON, now contains
"and&#​39;where it contained"and'.CGI.unescapeHTMLdecodes them.
[GHSA-rq8q-p985-fjq7]
Mike Dalessio
Escape the matched phrase before substituting it into
highlight's:highlighter.A match was copied into each
\1of the highlighter as it appeared inthe sanitized text, which keeps
"and'as they are, so a matchcontaining a quote ended a quoted attribute value such as the
documented
'<a href="search?q=\1">\1</a>'and added attributes ofits own. Each substituted group now goes through
ERB::Util.html_escape_once, so quotes in a match render as"and
&#​39;. Only the numbered placeholders\0to\9are expanded,and a match never replaces the
>that closes a tag.[GHSA-v6rj-xm57-3p59]
Jeremy Daer
Require rails-html-sanitizer 1.7.2 or later.
With the HTML5 sanitizer, Nokogiri before 1.19.5 left
<and>unescaped in attribute values.
highlightandsimple_format, whichedit the sanitized HTML as a string, could then turn markup inside an
attribute value into live elements. rails-html-sanitizer 1.7.2 requires
Loofah 2.25.3, which requires Nokogiri 1.19.5.
[GHSA-2p2f-4rq4-gjwc]
Mike Dalessio
Action Pack
Apply
config.action_dispatch.cookies_same_site_protectionto every sessionstore.
ActionDispatch::Session::CacheStore,MemCacheStoreand third-partystores built on
AbstractStoreor the session mixins sent session cookieswith no
SameSiteattribute. OnlyCookieStoreapplied the configureddefault.
[GHSA-gmj8-hvj3-49mw]
Jean Boussier
Prevent
ActionController::Livestreams from blocking when a full buffer isclosed or aborted.
[GHSA-rwvh-fw6r-pwvp]
Jeremy Daer
Set and extend the
Varyheader for rendered responses according to therequest headers used in format negotiation.
Vary: Acceptwas only added when the request carried a usableAcceptheader. A response to a request without one, negotiated to HTML or
JavaScript, could be stored by a shared cache and served to later clients
that requested a different representation.
Responses now vary on
AcceptandX-Requested-Withwhenever the format isnot given by the URL. XHR requests without
Acceptalso vary onContent-Type, which Rails uses as a legacy format fallback. Whenconfig.action_dispatch.ignore_accept_headeris enabled, responses varyonly on
X-Requested-With.These fields are appended to an existing
Varyvalue without duplicatingfields case-insensitively.
Vary: *remains unchanged.[GHSA-r9jg-fmfx-2gv6]
Jeremy Daer
Skip writing a
CacheStoresession that another request deleted while thisone ran.
A request that loaded a session from
ActionDispatch::Session::CacheStorewrote it back when it finished, even after a concurrent
reset_sessionor aserver-side delete had removed it, so the old session ID worked again.
[GHSA-2586-8ghr-69fj]
Mike Dalessio
Don't write upgraded cookies to a response that skips the session.
Reading a signed or encrypted cookie written under a rotated secret, or in
the format a
:hybridserializer migrates from, writes it back in thecurrent format. That write ignored
request.session_options[:skip], so aresponse that skips the session, such as the Active Storage proxy's
public, cacheable response, could still carry the session cookie in
Set-Cookie. Such a response now leaves the cookie unchanged, and a laterrequest that does not skip the session upgrades it. An application that
skips the session on every request no longer upgrades its signed or
encrypted cookies. Cookies the application sets are still written.
[GHSA-x6mj-8jx9-qhqv]
Mike Dalessio
ActionController::Parameters#each_keyreturnsselfwhen given a block.It returned the internal
ActiveSupport::HashWithIndifferentAccess, whichdoes not respond to
permitted?, so passing that return value to massassignment skipped the Strong Parameters check.
each,each_pairandeach_valuealready returnself.Document that
ActionController::Parameters#as_jsonreturns everyparameter, permitted or not, in a hash that mass assignment does not check.
[GHSA-wm3x-v3qw-4jh3]
Mike Dalessio
Active Job
Action Mailer
Action Cable
Active Storage
Preserve committed proxy responses when a storage error interrupts a
streamed download.
[GHSA-4v2w-w6g6-f8f8]
Jeremy Daer
Derive
ActiveStorage::Filename#baseand#extensionfrom the sanitizedfilename.
This prevents null bytes and invalid byte sequences in stored filename
metadata from raising when a blob is opened or represented. Existing blob
records are handled without a data migration.
[GHSA-p2pm-g2h6-7j5j]
Jeremy Daer
Ship an ImageMagick security policy and apply it to every ImageMagick
process MiniMagick spawns.
ImageMagick chooses a coder from the content of the file it is given, and
some coders act on files named inside the image rather than on the image
itself. Active Storage constrained none of them, so an uploaded file could
reach any coder the host's policy allowed, through the ImageMagick analyzer
at attach time, with no variant or
analyzecall in the application.Active Storage now ships a
policy.xmlinActiveStorage::ImageMagick::POLICY_DIRECTORYand prepends that directoryto
MAGICK_CONFIGURE_PATHthroughMiniMagick.cli_env. ImageMagick appliesevery policy file on its search path, so the shipped policy adds to the
host's policy rather than replacing it. A
MAGICK_CONFIGURE_PATHset in theenvironment or in
MiniMagick.cli_env, including by an initializer ordotenv, is kept after the shipped directory.
The shipped policy denies the coders that script ImageMagick (
MSL), reador delete files other than the image (
TEXT,EPHEMERAL), fetch remotereferences (
URL,HTTP,HTTPS,FTP), display to a screen (SHOW,WIN,PLT), or hand the file to Ghostscript (thePS,EPS,EPTandPDFcoders, every alias of them, and thegsdelegate), or reach a filedirectly (
FILE,MPC,XPS,PCL), and it refuses@filenameindirection. The policy applies to every ImageMagick command MiniMagick
runs, not only Active Storage's.
These applications must act:
:mini_magickhas to use mini_magick 5.1or later, which applying the policy requires. With an older mini_magick,
it raises at boot.
the
gsdelegate and the coders it uses in the host'spolicy.xml. Ahost policy that allows a coder overrides the shipped deny.
MiniMagick.cli_envafter it boots, clears theenvironment with
MiniMagick.cli_prefix, or installs its ownMiniMagick::Shellnever receives the shipped policy and has to carryits rules in ImageMagick's system policy. So does one that uses
GraphicsMagick, which does not read ImageMagick policies.
Every other application needs no change. See "ImageMagick Security Policy"
in the Active Storage guide.
[GHSA-f3w6-w445-fwh9]
Mike Dalessio
Enforce the declared content length on Google Cloud Storage direct uploads.
The signed URL now requires an
x-goog-content-length-rangeheader matching the blob'sbyte_size, so Cloud Storage rejects a body of any other size.Browsers send the new header, so a bucket's CORS configuration must list
x-goog-content-length-rangeinresponseHeader, or direct uploads from the browser fail.[GHSA-hfr4-8rjc-97m2]
Mike Dalessio
Sign GCS direct uploads with V2 when
cache_controlis set.V4 signatures did not bind the Content-Type or Content-MD5 headers, so the uploader could
choose the stored Content-Type. Direct-upload URLs with
cache_controlare no longer limitedto 7 days, and the client sends
Cache-Controlunsigned.[GHSA-3w93-6hmw-whh4]
Mike Dalessio
Stop an uploaded filename choosing the extension of the tempfile Active
Storage hands to an external tool.
ActiveStorage::Blob#opennamed its tempfile after the uploaded filename,extension and all. Tools that select a decoder from the extension alone,
such as FFmpeg's AviSynth demuxer on
.avs, therefore took theirinstructions from the uploader. The extension is now kept only when it
denotes the blob's recorded media type, and dropped otherwise.
[GHSA-v924-7rp8-4mxh]
Mike Dalessio
Restrict the formats ffmpeg and ffprobe will open when previewing and
analyzing video and audio.
Active Storage now passes
-format_whitelistbefore the input at everyffmpeg and ffprobe call site, limiting demuxer selection to common audio and
video container formats. Configure the list with
config.active_storage.ffmpeg_allowed_formats, or set it tonilto letffmpeg choose any demuxer it was built with.
Files in other formats, such as MXF, DV, AC3, WavPack, AU, W64, and raw
H.264 or MPEG-1/2 video streams, now fail to preview with
ActiveStorage::PreviewError, and their analysis stores no media metadataand logs a warning. Add their demuxers to the list to keep them.
[GHSA-3f4q-8x5m-76v8]
Mike Dalessio
Action Mailbox
Reject Mailgun inbound emails whose timestamp is more than 2 minutes ahead
of local time.
[GHSA-5957-c7qm-m469]
Mike Dalessio
Action Text
Railties
Guides
v8.0.5.1: 8.0.5.1Compare Source
Active Support
Active Model
Active Record
Action View
Action Pack
Active Job
Action Mailer
Action Cable
Active Storage
Disable libvips's unfuzzed image loaders and savers.
libvips flags some of its loaders and savers as "unfuzzed" or "untrusted", meaning they are only
safe for trusted content. Active Storage will call
Vips.block_untrusted(true)to disable themwhile booting. An application that needs a specific loader or saver may re-enable it in an
initializer.
This is a breaking change for applications that process image types with an unfuzzed loader or
saver. Variant transformation of BMP, ICO, and PSD attachments will raise
Vips::Error, andanalysis of these and other types such as SVG, JPEG XL, JPEG 2000, and Netpbm will no longer
record
widthandheight. Requesting an unfuzzed output format, typically FITS, JXL, oranything delegated to ImageMagick, will also raise
Vips::Error. Attaching, storing, anddownloading are unchanged.
An application seeing
Vips::Errorraised during image transformation may wish to remove theaffected content types from
config.active_storage.variable_content_typesin an initializer.Active Storage will then treat those attachments as not variable and will not generate variants
for them. This most often matters to an application that transforms images during a request
rather than in a background job, where the failure surfaces as an error response instead of a
failed job.
Applications using the
:mini_magickvariant processor will see no change in how theirattachments are processed, but the loaders and savers will be disabled process-wide whenever
ruby-vips is installed, and the version requirements below will still apply. Such an application
may remove ruby-vips from its Gemfile to avoid both.
The minimum supported version of libvips is now 8.13, and the minimum supported version of
ruby-vips is now 2.2.1. These are the earliest versions that are capable of disabling untrusted
operations. When ruby-vips is installed and either minimum is not met, Active Storage will raise
a
RuntimeErrorwhile booting rather than run in an unsecurable environment.[GHSA-xr9x-r78c-5hrm]
[CVE-2026-66066]
Mike Dalessio
Action Mailbox
Action Text
Railties
Guides
v8.0.5: 8.0.5Compare Source
Active Support
Fix inflections to better handle overlapping acronyms.
Said Kaldybaev
Silence Dalli 4.0+ warning when using
ActiveSupport::Cache::MemCacheStore.zzak
Make
delegateanddelegate_missing_towork in BasicObject subclasses.Rafael Mendonça França
Fix
ActiveSupport::Inflector.humanizewith international characters.Jose Luis Duran
Active Model
Active Record
Fix
insert_allandupsert_alllog message when called on anonymous classes.Gabriel Sobrinho
Respect
ActiveRecord::SchemaDumper.ignore_tableswhen dumping SQLite virtual tables.Hans Schnedlitz
Restore previous instrumenter after
execute_or_skipFutureResult#execute_or_skipreplaces the thread's instrumenter with anEventBufferto collect events published during async query execution.If the global async executor is saturated and the
caller_runsfallbackexecutes the task on the calling thread, we need to make sure the previous
instrumenter is restored or the stale
EventBufferwould stay in place andpermanently swallow all subsequent
sql.active_recordnotifications onthat thread.
Rosa Gutierrez
Fix Ruby 4.0 delegator warning when calling inspect on ActiveRecord::Type::Serialized.
Hammad Khan
Fix support for table names containing hyphens.
Evgeniy Demin
Fix column deduplication for SQLite3 and PostgreSQL virtual (generated) columns.
Column#==andColumn#hashnow account forvirtual?so that theDeduplicableregistry does not treat a generated column and a regularcolumn with the same name and type as identical. Previously, if a
generated column was registered first, a regular column on a different
table could be deduplicated to the generated instance, silently
excluding it from INSERT/UPDATE statements.
Jay Huber
Fix merging relations with arel equality predicates with null relations.
fatkodima
Fix SQLite3 schema dump for non-autoincrement integer primary keys.
Previously,
schema.rbshould incorrectly restore that table with an auto incrementingprimary key.
Chris Hasiński
Fix PostgreSQL
schema_search_pathnot being reapplied afterreset!orreconnect!.The
schema_search_pathconfigured indatabase.ymlis now correctlyreapplied instead of falling back to PostgreSQL defaults.
Tobias Egli
Ensure batched preloaded associations accounts for klass when grouping to avoid issues with STI.
zzak, Stjepan Hadjic
Fix
ActiveRecord::SoleRecordExceeded#recordto return the relation.This was the case until Rails 7.2, but starting from 8.0 it
started mistakenly returning the model class.
Jean Boussier
Improve PostgreSQLAdapter resilience to Timeout.timeout.
Better handle asynchronous exceptions being thrown inside
the
reconnect!method.This may fixes some deep errors such as:
Jean Boussier
Fix
eager_loadwhen loadinghas_manyassocations with composite primary keys.This would result in some records being loaded multiple times.
Martin-Alexander
Action View
Fix encoding errors for string locals containing non-ASCII characters.
Kataoka Katsuki
Fix collection caching to only forward
expires_inargument if explicitly set.Pieter Visser
Fix
file_fieldto join mime types with a comma when provided as ArrayNow behaves likes:
Bogdan Gusiev
Fix strict locals parsing to handle multiline definitions.
Said Kaldybaev
Action Pack
Add
config.action_controller.live_streaming_excluded_keysto control execution state sharing in ActionController::Live.When using ActionController::Live, actions are executed in a separate thread that shares
state from the parent thread. This new configuration allows applications to opt-out specific
state keys that should not be shared.
This is useful when streaming inside a
connected_toblock, where you may wantthe streaming thread to use its own database connection context.
By default, all keys are shared.
Eileen M. Uchitelle
Active Job
Action Mailer
Action Cable
Active Storage
Fix
ActiveStorage::Blobcontent type predicate methods to handlenil.Daichi KUDO
Action Mailbox
Action Text
Railties
Fixed the
rails notescommand to properly extract notes in CSS files.David White
Fixed the default Dockerfile to properly include the
vendor/directory duringbundle install.Zhong Sheng
Guides
v8.0.4.1: 8.0.4.1Compare Source
Active Support
Reject scientific notation in NumberConverter
[CVE-2026-33176]
Jean Boussier
Fix
SafeBuffer#%to preserve unsafe status[CVE-2026-33170]
Jean Boussier
Improve performance of NumberToDelimitedConverter
[CVE-2026-33169]
Jean Boussier
Active Model
Active Record
Action View
Skip blank attribute names in tag helpers to avoid generating invalid HTML.
[CVE-2026-33168]
Mike Dalessio
Action Pack
Active Job
Action Mailer
Action Cable
Active Storage
Filter user supplied metadata in DirectUploadController
[CVE-2026-33173]
Jean Boussier
Configurable maxmimum streaming chunk size
Makes sure that byte ranges for blobs don't exceed 100mb by default.
Content ranges that are too big can result in denial of service.
[CVE-2026-33174]
Gannon McGibbon
Limit range requests to a single range
[CVE-2026-33658]
Jean Boussier
Prevent path traversal in
DiskService.DiskService#path_fornow raises anInvalidKeyErrorwhen passed keys with dot segments (".",".."), or if the resolved path is outside the storage root directory.
#path_foralso now consistently raisesInvalidKeyErrorif the key is invalid in any way, forexample containing null bytes or having an incompatible encoding. Previously, the exception
raised may have been
ArgumentErrororEncoding::CompatibilityError.DiskControllernow explicitly rescuesInvalidKeyErrorwith appropriate HTTP status codes.[CVE-2026-33195]
Mike Dalessio
Prevent glob injection in
DiskService#delete_prefixed.Escape glob metacharacters in the resolved path before passing to
Dir.glob.Note that this change breaks any existing code that is relying on
delete_prefixedto expandglob metacharacters. This change presumes that is unintended behavior (as other storage services
do not respect these metacharacters).
[CVE-2026-33202]
Mike Dalessio
Action Mailbox
Action Text
Railties
Guides
v8.0.4: 8.0.4Compare Source
Active Support
Fix
Enumerable#soleto return the full tuple instead of just the first element of the tuple.Olivier Bellone
Fix parallel tests hanging when worker processes die abruptly.
Previously, if a worker process was killed (e.g., OOM killed,
kill -9) during paralleltest execution, the test suite would hang forever waiting for the dead worker.
Joshua Young
Fix
NameErrorwhenclass_attributeis defined on instance singleton classes.Previously, calling
class_attributeon an instance's singleton class would raisea
NameErrorwhen accessing the attribute through the instance.Joshua Young
Active Model
Active Record
Fix SQLite3 data loss during table alterations with CASCADE foreign keys.
When altering a table in SQLite3 that is referenced by child tables with
ON DELETE CASCADEforeign keys, ActiveRecord would silently delete alldata from the child tables. This occurred because SQLite requires table
recreation for schema changes, and during this process the original table
is temporarily dropped, triggering CASCADE deletes on child tables.
The root cause was incorrect ordering of operations. The original code
wrapped
disable_referential_integrityinside a transaction, butPRAGMA foreign_keyscannot be modified inside a transaction in SQLite -attempting to do so simply has no effect. This meant foreign keys remained
enabled during table recreation, causing CASCADE deletes to fire.
The fix reverses the order to follow the official SQLite 12-step ALTER TABLE
procedure:
disable_referential_integritynow wraps the transaction insteadof being wrapped by it. This ensures foreign keys are properly disabled
before the transaction starts and re-enabled after it commits, preventing
CASCADE deletes while maintaining data integrity through atomic transactions.
Ruy Rocha
Add support for bound SQL literals in CTEs.
Nicolas Bachschmidt
Fix
belongs_toassociations not to clear the entire composite primary key.When clearing a
belongs_toassociation that references a model with composite primary key,only the optional part of the key should be cleared.
zzak
Fix invalid records being autosaved when distantly associated records are marked for deletion.
Ian Terrell, axlekb AB
Action View
Restore
add_default_name_and_idmethod.Hartley McGuire
Action Pack
Submit test requests using
as: :htmlwithContent-Type: x-www-form-urlencodedSean Doyle
Active Job
Action Mailer
Action Cable
Active Storage
Action Mailbox
Action Text
Railties
Guides
v8.0.3: 8.0.3Compare Source
Active Support
ActiveSupport::FileUpdateCheckerdoes not depend onTime.nowto prevent unnecessary reloads with time travel test helpersJan Grodowski
Fix
ActiveSupport::BroadcastLoggerfrom executing a block argument for each logger (tagged, info, etc.).Jared Armstrong
Make
ActiveSupport::Logger#freeze-friendly.Joshua Young
Fix
ActiveSupport::HashWithIndifferentAccess#transform_keys!removing defaults.Hartley McGuire
Fix
ActiveSupport::HashWithIndifferentAccess#tranform_keys!to handle collisions.If the transformation would result in a key equal to another not yet transformed one,
it would result in keys being lost.
Before:
After:
Jason T Johnson, Jean Boussier
Fix
ActiveSupport::Cache::MemCacheStore#read_multito handle network errors.This method specifically wasn't handling network errors like other codepaths.
Alessandro Dal Grande
Fix configuring
RedisCacheStorewithraw: true.fatkodima
Fix
Enumerable#solefor infinite collections.fatkodima
Active Model
Fix
has_secure_passwordto perform confirmation validation of the password even when blank.The validation was incorrectly skipped when the password only contained whitespace characters.
Fabio Sangiovanni
Active Record
Fix query cache for pinned connections in multi threaded transactional tests
When a pinned connection is used across separate threads, they now use a separate cache store
for each thread.
This improve accuracy of system tests, and any test using multiple threads.
Heinrich Lee Yu, Jean Boussier
Don't add
id_valueattribute alias when attribute/column with that name already exists.Rob Lewis
Fix false positive change detection involving STI and polymorphic has one relationships.
Polymorphic
has_onerelationships would always be considered changed when defined in a STI childclass, causing nedless extra autosaves.
David Fritsch
Skip calling
PG::Connection#cancelincancel_any_running_querywhen using libpq >= 18 with pg < 1.6.0, due to incompatibility.
Rollback still runs, but may take longer.
Yasuo Honda, Lars Kanis
Fix stale association detection for polymorphic
belongs_to.Florent Beaurain, Thomas Crambert
Fix removal of PostgreSQL version comments in
structure.sqlfor latest PostgreSQL versions which include\restrictBrendan Weibrecht
Allow setting
schema_formatin database configuration.Useful in multi-database setups to have different formats per-database.
T S Vallender
Use ntuples to populate row_count instead of count for Postgres
Jonathan Calvert
Fix
#mergewith#oror#andand a mixture of attributes and SQL strings resulting in an incorrect query.Before:
After:
Joshua Young
Fix inline
has_and_belongs_to_manyfixtures for tables with composite primary keys.fatkodima
Fix migration log message for down operations.
Bernardo Barreto
Prepend
extra_flagsin postgres'structure_loadWhen specifying
structure_load_flagswith a postgres adapter, the flagswere appended to the default flags, instead of prepended.
This caused issues with flags not being taken into account by postgres.
Alice Loeser
Fix
annotatecomments to propagate toupdate_all/delete_all.fatkodima
Fix checking whether an unpersisted record is
include?d in a strictlyloaded
has_and_belongs_to_manyassociation.Hartley McGuire
create_or_find_bywill now correctly rollback a transaction.When using
create_or_find_by, raising a ActiveRecord::Rollback errorin a
after_savecallback had no effect, the transaction was committedand a record created.
Edouard Chin
Gracefully handle
Timeout.timeoutfiring during connection configuration.Use of
Timeout.timeoutcould result in improperly initialized database connection.This could lead to a partially configured connection being used, resulting in various exceptions,
the most common being with the PostgreSQLAdapter raising
undefined method 'key?' for nilor
TypeError: wrong argument type nil (expected PG::TypeMap).Jean Boussier
Fix stale state for composite foreign keys in belongs_to associations.
Varun Sharma
Action View
Fix label with
foroption not getting prefixed by formnamespacevalueAbeid Ahmed, Hartley McGuire
Fix
javascript_include_tagtypeoption to accept either strings and symbols.Previously, only the string value was recognized.
Jean Boussier
Fix
excerpthelper with non-whitespace separator.Jonathan Hefner
Action Pack
URL helpers for engines mounted at the application root handle
SCRIPT_NAMEcorrectly.Fixed an issue where
SCRIPT_NAMEis not applied to paths generated for routes in an enginemounted at "/".
Mike Dalessio
Fix
Rails.application.reload_routes!from clearing almost all routes.When calling
Rails.application.reload_routes!inside a middleware ofa Rake task, it was possible under certain conditions that all routes would be cleared.
If ran inside a middleware, this would result in getting a 404 on most page you visit.
This issue was only happening in development.
Edouard Chin
Address
rack 3.2deprecations warnings.Rails API will transparently convert one into the other for the foreseeable future.
Earlopain, Jean Boussier
Support hash-source in Content Security Policy.
madogiwa
Always return empty body for HEAD requests in
PublicExceptionsandDebugExceptions.This is required by
Rack::Lint(per RFC9110).Hartley McGuire
Active Job
Include the actual Active Job locale when serializing rather than I18n locale.
Adrien S
Fix
retry_jobinstrumentation when using:testadapter for Active Job.fatkodima
Action Mailer
Action Cable
Fixed compatibility with
redisgem5.4.1Jean Boussier
Fixed a possible race condition in
stream_from.OuYangJinTing
Active Storage
Address deprecation of
Aws::S3::Object#upload_streaminActiveStorage::Service::S3Service.Joshua Young
Fix
config.active_storage.touch_attachment_recordsto work with eager loading.fatkodima
Action Mailbox
Action Text
Add rollup-plugin-terser as a dev dependency.
Édouard Chin
Railties
Fix
polymorphic_urlandpolymorphic_pathnot working when routes are not loaded.Édouard Chin
Fix Rails console to not override user defined IRB_NAME.
Only change the prompt name if it hasn't been customized in
.irbrc.Jarrett Lusso
Guides
v8.0.2.1: 8.0.2.1Compare Source
Active Support
Active Model
Active Record
Call inspect on ids in RecordNotFound error
[CVE-2025-55193]
Gannon McGibbon, John Hawthorn
Action View
Action Pack
Active Job
Action Mailer
Action Cable
Active Storage
Action Mailbox
Action Text
Railties
Guides
v8.0.2: 8.0.2Compare Source
Active Support
Fix setting
to_time_preserves_timezonefromnew_framework_defaults_8_0.rb.fatkodima
Fix Active Support Cache
fetch_multiwhen local store is active.fetch_multinow properly yield to the provided block for missing entriesthat have been recorded as such in the local store.
Jean Boussier
Fix execution wrapping to report all exceptions, including
Exception.If a more serious error like
SystemStackErrororNoMemoryErrorhappens,the error reporter should be able to report these kinds of exceptions.
Gannon McGibbon
Fix
RedisCacheStoreandMemCacheStoreto also handle connection pool related errors.These errors are rescued and reported to
Rails.error.Jean Boussier
Fix
ActiveSupport::Cache#read_multito respect version expiry when using local cache.zzak
Fix
ActiveSupport::MessageVerifierandActiveSupport::MessageEncryptorconfiguration ofon_rotationcallback.Now both work as documented.
Jean Boussier
Fix
ActiveSupport::MessageVerifierto always be able to verify both URL-safe and URL-unsafe payloads.This is to allow transitioning seemlessly from either configuration without immediately invalidating
all previously generated signed messages.
Jean Boussier, Florent Beaurain, Ali Sepehri
Fix
cache.fetchto honor the provided expiry when:race_condition_ttlis used.In the above example, the final cache entry would have a 10 seconds TTL instead
of the requested 1 hour.
Dhia
Better handle procs with splat arguments in
set_callback.Radamés Roriz
Fix
String#mb_charsto not mutate the receiver.Previously it would call
force_encodingon the receiver,now it dups the receiver first.
Jean Boussier
Improve
ErrorSubscriberto also mark error causes as reported.This avoid some cases of errors being reported twice, notably in views because of how
errors are wrapped in
ActionView::Template::Error.Jean Boussier
Fix
Module#module_parent_nameto return the correct name after the module has been named.When called on an anonymous module, the return value wouldn't change after the module was given a name
later by being assigned to a constant.
Jean Boussier
Active Model
Active Record
Fix inverting
rename_enum_valuewhen:from/:toare provided.fatkodima
Prevent persisting invalid record.
Edouard Chin
Fix inverting
drop_tablewithout options.fatkodima
Fix count with group by qualified name on loaded relation.
Ryuta Kamizono
Fix
sumwith qualified name on loaded relation.Chris Gunther
The SQLite3 adapter quotes non-finite Numeric values like "Infinity" and "NaN".
Mike Dalessio
Handle libpq returning a database version of 0 on no/bad connection in
PostgreSQLAdapter.Before, this version would be cached and an error would be raised during connection configuration when
comparing it with the minimum required version for the adapter. This meant that the connection could
never be successfully configured on subsequent reconnection attempts.
Now, this is treated as a connection failure consistent with libpq, raising a
ActiveRecord::ConnectionFailedand ensuring the version isn't cached, which allows the version to be retrieved on the next connection attempt.
Joshua Young, Rian McGuire
Fix error handling during connection configuration.
Active Record wasn't properly handling errors during the connection configuration phase.
This could lead to a partially configured connection being used, resulting in various exceptions,
the most common being with the PostgreSQLAdapter raising
undefined methodkey?' for nilorTypeError: wrong argument type nil (expected PG::TypeMap)`.Jean Boussier
Fix a case where a non-retryable query could be marked retryable.
Hartley McGuire
Handle circular references when autosaving associations.
zzak
PoolConfig no longer keeps a reference to the connection class.
Keeping a reference to the class caused subtle issues when combined with reloading in
development. Fixes #54343.
Mike Dalessio
Fix SQL notifications sometimes not sent when using async queries.
In rare circumstances and under the right race condition, Active Support notifications
would no longer be dispatched after using an asynchronous query.
This is now fixed.
Edouard Chin
Fix support for PostgreSQL enum types with commas in their name.
Arthur Hess
Fix inserts on MySQL with no RETURNING support for a table with multiple auto populated columns.
Nikita Vasilevsky
Fix joining on a scoped association with string joins and bind parameters.
The above example would result in
ActiveRecord::StatementInvalidbecause theactivescope bind parameters would be lost.Jean Boussier
Fix a potential race condition with system tests and transactional fixtures.
Sjoerd Lagarde
Fix autosave associations to no longer validated unmodified associated records.
Active Record was incorrectly performing validation on associated record that
weren't created nor modified as part of the transaction:
Jean Boussier
Remember when a database connection has recently been verified (for
two seconds, by default), to avoid repeated reverifications during a
single request.
This should recreate a similar rate of verification as in Rails 7.1,
where connections are leased for the duration of a request, and thus
only verified once.
Matthew Draper
Action View
Respect
html_options[:form]whencollection_checkboxesgenerates thehidden
<input>.Riccardo Odone
Layouts have access to local variables passed to
render.This fixes #31680 which was a regression in Rails 5.1.
Mike Dalessio
Argument errors related to strict locals in templates now raise an
ActionView::StrictLocalsError, and all other argument errors are reraised as-is.Previously, any
ArgumentErrorraised during template rendering was swallowed during strictlocal error handling, so that an
ArgumentErrorunrelated to strict locals (e.g., a helpermethod invoked with incorrect arguments) would be replaced by a similar
ArgumentErrorwith anunrelated backtrace, making it difficult to debug templates.
Now, any
ArgumentErrorunrelated to strict locals is reraised, preserving the originalbacktrace for developers.
Also note that
ActionView::StrictLocalsErroris a subclass ofArgumentError, so any existingcode that rescues
ArgumentErrorwill continue to work.Fixes #52227.
Mike Dalessio
Fix stack overflow error in dependency tracker when dealing with circular dependencies
Jean Boussier
Action Pack
Improve
with_routingtest helper to not rebuild the middleware stack.Otherwise some middleware configuration could be lost.
Édouard Chin
Add resource name to the
ArgumentErrorthat's raised when invalid:onlyor:exceptoptions are given to#resourceor#resourcesThis makes it easier to locate the source of the problem, especially for routes drawn by gems.
Before:
After:
Jeremy Green
Fix
url_forto handle:path_paramsgracefully when it's not aHash.Prevents various security scanners from causing exceptions.
Martin Emde
Fix
ActionDispatch::Executorto unwrap exceptions like other error reporting middlewares.Jean Boussier
Active Job
Action Mailer
Action Cable
Active Storage
A Blob will no longer autosave associated Attachment.
This fixes an issue where a record with an attachment would have
its dirty attributes reset, preventing your
after commitcallbackson that record to behave as expected.
Note that this change doesn't require any changes on your application
and is supposed to be internal. Active Storage Attachment will continue
to be autosaved (through a different relation).
Edouard-chin
Action Mailbox
Configuration
📅 Schedule: (in timezone Europe/London)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.