Repository navigation
Update dependency rails to v8.1.4.1 - #996
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 branch was successfully deployed
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.
This PR contains the following updates:
8.1.4→8.1.4.1Release Notes
rails/rails (rails)
v8.1.4.1: 8.1.4.1Compare Source
Active Support
ActiveSupport::MessagePackno longer deserializes an unsafeActiveSupport::SafeBufferashtml_safe.A
SafeBufferthat was no longerhtml_safe?, for example after anin-place
gsub!, was deserialized as anhtml_safeSafeBuffer. It is nowserialized with an unsafe marker and deserialized as a
String. Earlierversions of Rails cannot read an unsafe buffer serialized this way.
[GHSA-2w9f-fxwj-w2qf]
Jean Boussier
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
Detect conflicts between the
ForwardedandX-Forwarded-Forheaders inActionDispatch::RemoteIp.When
ip_spoofing_checkis enabled (the default), requests carrying bothheaders with conflicting client addresses now raise
ActionDispatch::RemoteIp::IpSpoofAttackError.[GHSA-2gff-2mmg-m73p]
Gannon McGibbon, 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
Configuration
📅 Schedule: (UTC)
* 0-4,22-23 * * 1-5)* * * * 0,6)🚦 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 was generated by Mend Renovate. View the repository job log.