Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency rails to v7.0.8.1 [security] - autoclosed #24

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Feb 28, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
rails (source, changelog) 7.0.2.3 -> 7.0.8.1 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2024-26144

Possible Sensitive Session Information Leak in Active Storage

There is a possible sensitive session information leak in Active Storage. By
default, Active Storage sends a Set-Cookie header along with the user's
session cookie when serving blobs. It also sets Cache-Control to public.
Certain proxies may cache the Set-Cookie, leading to an information leak.

This vulnerability has been assigned the CVE identifier CVE-2024-26144.

Versions Affected: >= 5.2.0, < 7.1.0
Not affected: < 5.2.0, > 7.1.0
Fixed Versions: 7.0.8.1, 6.1.7.7

Impact

A proxy which chooses to caches this request can cause users to share
sessions. This may include a user receiving an attacker's session or vice
versa.

This was patched in 7.1.0 but not previously identified as a security
vulnerability.

All users running an affected release should either upgrade or use one of the
workarounds immediately.

Releases

The fixed releases are available at the normal locations.

Workarounds

Upgrade to Rails 7.1.X, or configure caching proxies not to cache the
Set-Cookie headers.

Credits

Thanks to tyage for reporting this!

CVE-2024-26143

Possible XSS Vulnerability in Action Controller

There is a possible XSS vulnerability when using the translation helpers
(translate, t, etc) in Action Controller. This vulnerability has been
assigned the CVE identifier CVE-2024-26143.

Versions Affected: >= 7.0.0.
Not affected: < 7.0.0
Fixed Versions: 7.1.3.1, 7.0.8.1

Impact

Applications using translation methods like translate, or t on a
controller, with a key ending in "_html", a :default key which contains
untrusted user input, and the resulting string is used in a view, may be
susceptible to an XSS vulnerability.

For example, impacted code will look something like this:

class ArticlesController < ApplicationController
  def show  
    @&#8203;message = t("message_html", default: untrusted_input)
    # The `show` template displays the contents of `@message`
  end
end

To reiterate the pre-conditions, applications must:

  • Use a translation function from a controller (i.e. not I18n.t, or t from
    a view)
  • Use a key that ends in _html
  • Use a default value where the default value is untrusted and unescaped input
  • Send the text to the victim (whether that's part of a template, or a
    render call)

All users running an affected release should either upgrade or use one of the
workarounds immediately.

Releases

The fixed releases are available at the normal locations.

Workarounds

There are no feasible workarounds for this issue.

Patches

To aid users who aren't able to upgrade immediately we have provided patches for
the two supported release series. They are in git-am format and consist of a
single changeset.

  • 7-0-translate-xss.patch - Patch for 7.0 series
  • 7-1-translate-xss.patch - Patch for 7.1 series

Credits

Thanks to ooooooo_q for the patch and fix!


Release Notes

rails/rails (rails)

v7.0.8.1: 7.0.8.1

Compare Source

Active Support

  • No changes.

Active Model

  • No changes.

Active Record

  • No changes.

Action View

  • No changes.

Action Pack

  • Fix possible XSS vulnerability with the translate method in controllers

    CVE-2024-26143

Active Job

  • No changes.

Action Mailer

  • No changes.

Action Cable

  • No changes.

Active Storage

  • Disables the session in ActiveStorage::Blobs::ProxyController
    and ActiveStorage::Representations::ProxyController
    in order to allow caching by default in some CDNs as CloudFlare

    Fixes #​44136

    Bruno Prieto

Action Mailbox

  • No changes.

Action Text

  • No changes.

Railties

  • No changes.

v7.0.8: 7.0.8

Compare Source

Active Support
  • Fix TimeWithZone still using deprecated #to_s when ENV or config to
    disable it are set.

    Hartley McGuire

  • Fix CacheStore#write_multi when using a distributed Redis cache with a connection pool.

    Fixes #​48938.

    Jonathan del Strother

Active Model
  • No changes.
Active Record
  • Fix change_column not setting precision: 6 on datetime columns when
    using 7.0+ Migrations and SQLite.

    Hartley McGuire

  • Fix unscope is not working in specific case

    Before:

    Post.where(id: 1...3).unscope(where: :id).to_sql # "SELECT `posts`.* FROM `posts` WHERE `posts`.`id` >= 1 AND `posts`.`id` < 3"

    After:

    Post.where(id: 1...3).unscope(where: :id).to_sql # "SELECT `posts`.* FROM `posts`"

    Fixes #​48094.

    Kazuya Hatanaka

  • Fix associations to a STI model including a class_name parameter

    class Product < ApplicationRecord
      has_many :requests, as: :requestable, class_name: "ProductRequest", dependent: :destroy
    end
STI tables
class Request < ApplicationRecord
  belongs_to :requestable, polymorphic: true

  validate :request_type, presence: true
end

class ProductRequest < Request
  belongs_to :user
end
```

Accessing such association would lead to:

```
table_metadata.rb:22:in `has_column?': undefined method `key?' for nil:NilClass (NoMethodError)
```

*Romain Filinto*
  • Fix change_table setting datetime precision for 6.1 Migrations

    Hartley McGuire

  • Fix change_column setting datetime precision for 6.1 Migrations

    Hartley McGuire

Action View
  • Fix form_for missing the hidden _method input for models with a
    namespaced route.

    Hartley McGuire

  • Fix render collection: @&#8203;records, cache: true inside jbuilder templates

    The previous fix that shipped in 7.0.7 assumed template fragments are always strings,
    this isn't true with jbuilder.

    Jean Boussier

Action Pack
  • Fix HostAuthorization potentially displaying the value of the
    X_FORWARDED_HOST header when the HTTP_HOST header is being blocked.

    Hartley McGuire, Daniel Schlosser

Active Job
  • Fix Active Job log message to correctly report a job failed to enqueue
    when the adapter raises an ActiveJob::EnqueueError.

    Ben Sheldon

Action Mailer
  • No changes.
Action Cable
  • No changes.
Active Storage
  • No changes.
Action Mailbox
  • No changes.
Action Text
  • No changes.
Railties
  • Omit webdrivers gem dependency from Gemfile template

    Sean Doyle

v7.0.7.2: 7.0.7.2

Compare Source

No changes between this and 7.0.7.2. This release was just to fix file permissions in the previous release.

v7.0.7.1: 7.0.7.1

Compare Source

Active Support

  • Use a temporary file for storing unencrypted files while editing

    [CVE-2023-38037]

Active Model

  • No changes.

Active Record

  • No changes.

Action View

  • No changes.

Action Pack

  • No changes.

Active Job

  • No changes.

Action Mailer

  • No changes.

Action Cable

  • No changes.

Active Storage

  • No changes.

Action Mailbox

  • No changes.

Action Text

  • No changes.

Railties

  • No changes.

v7.0.7: 7.0.7

Compare Source

Active Support

  • Fix Cache::NullStore with local caching for repeated reads.

    fatkodima

  • Fix to_s with no arguments not respecting custom :default formats

    Hartley McGuire

  • Fix ActiveSupport::Inflector.humanize(nil) raising NoMethodError: undefined method `end_with?' for nil:NilClass.

    James Robinson

  • Fix Enumerable#sum for Enumerator#lazy.

    fatkodima, Matthew Draper, Jonathan Hefner

  • Improve error message when EventedFileUpdateChecker is used without a
    compatible version of the Listen gem

    Hartley McGuire

Active Model

  • Error.full_message now strips ":base" from the message.

    zzak

  • Add a load hook for ActiveModel::Model (named active_model) to match the load hook for
    ActiveRecord::Base and allow for overriding aspects of the ActiveModel::Model class.

Active Record

  • Restores functionality to the missing method when using enums and fixes.

    paulreece

  • Fix StatementCache::Substitute with serialized type.

    ywenc

  • Fix :db_runtime on notification payload when application have multiple databases.

    Eileen M. Uchitelle

  • Correctly dump check constraints for MySQL 8.0.16+.

    Steve Hill

  • Fix ActiveRecord::QueryMethods#in_order_of to include nils, to match the
    behavior of Enumerable#in_order_of.

    For example, Post.in_order_of(:title, [nil, "foo"]) will now include posts
    with nil titles, the same as Post.all.to_a.in_order_of(:title, [nil, "foo"]).

    fatkodima

  • Revert "Fix autosave associations with validations added on :base of the associated objects."

    This change intended to remove the :base attribute from the message,
    but broke many assumptions which key these errors were stored.

    zzak

  • Fix #previously_new_record? to return true for destroyed records.

    Before, if a record was created and then destroyed, #previously_new_record? would return true.
    Now, any UPDATE or DELETE to a record is considered a change, and will result in #previously_new_record?
    returning false.

    Adrianna Chang

  • Revert breaking changes to has_one relationship deleting the old record before the new one is validated.

    zzak

  • Fix support for Active Record instances being uses in queries.

    As of 7.0.5, query arguments were deep duped to avoid mutations impacting
    the query cache, but this had the adverse effect to clearing the primary key when
    the query argument contained an ActiveRecord::Base instance.

    This broke the noticed gem.

    Jean Boussier

Action View

  • Fix render collection: @&#8203;records, cache: true to cache fragments as bare strings

    Previously it would incorrectly cache them as Action View buffers.

    Jean Boussier

  • Don't double-encode nested field_id and field_name index values

    Pass index: @&#8203;options as a default keyword argument to field_id and
    field_name view helper methods.

    Sean Doyle

Action Pack

  • No changes.

Active Job

  • No changes.

Action Mailer

  • No changes.

Action Cable

  • No changes.

Active Storage

  • No changes.

Action Mailbox

  • No changes.

Action Text

  • No changes.

Railties

  • Update default scaffold templates to set 303 (See Other) as status code
    on redirect for the update action for XHR requests other than GET or POST
    to avoid issues (e.g browsers trying to follow the redirect using the
    original request method resulting in double PATCH/PUT)

    Guillermo Iguaran

v7.0.6: 7.0.6

Compare Source

Active Support

  • Fix EncryptedConfiguration returning incorrect values for some Hash
    methods

    Hartley McGuire

  • Fix arguments being destructed Enumerable#many? with block.

    Andrew Novoselac

  • Fix humanize for strings ending with id.

    fatkodima

Active Model

  • No changes.

Active Record

  • Fix autosave associations with validations added on :base of the associated objects.

    fatkodima

  • Fix result with anonymous PostgreSQL columns of different type from json.

    Oleksandr Avoiants

  • Preserve timestamp when setting an ActiveSupport::TimeWithZone value to timestamptz attribute.

    fatkodima

  • Fix where on association with has_one/has_many polymorphic relations.

    Before:

    Treasure.where(price_estimates: PriceEstimate.all)
    #=> SELECT (...) WHERE "treasures"."id" IN (SELECT "price_estimates"."estimate_of_id" FROM "price_estimates")

    Later:

    Treasure.where(price_estimates: PriceEstimate.all)
    #=> SELECT (...) WHERE "treasures"."id" IN (SELECT "price_estimates"."estimate_of_id" FROM "price_estimates" WHERE "price_estimates"."estimate_of_type" = 'Treasure')

    Lázaro Nixon

  • Fix decrementing counter caches on optimistically locked record deletion

    fatkodima

  • Ensure binary-destined values have binary encoding during type cast.

    Matthew Draper

  • Preserve existing column default functions when altering table in SQLite.

    fatkodima

  • Remove table alias added when using where.missing or where.associated.

    fatkodima

  • Fix Enumerable#in_order_of to only flatten first level to preserve nesting.

    Miha Rekar

Action View

  • No changes.

Action Pack

  • No changes.

Active Job

  • Fix error Active Job passed class with permitted?.

    Alex Baldwin

Action Mailer

  • No changes.

Action Cable

  • Fix Action Cable Redis configuration with sentinels.

    Dmitriy Ivliev

Active Storage

  • Fix retrieving rotation value from FFmpeg on version 5.0+.

    In FFmpeg version 5.0+ the rotation value has been removed from tags.
    Instead the value can be found in side_data_list. Along with
    this update it's possible to have values of -90, -270 to denote the video
    has been rotated.

    Haroon Ahmed

Action Mailbox

  • No changes.

Action Text

  • No changes.

Railties

  • Avoid escaping paths when editing credentials.

    Jonathan Hefner

v7.0.5.1

Compare Source

Active Support

  • No changes.

Active Model

  • No changes.

Active Record

  • No changes.

Action View

  • No changes.

Action Pack

  • Raise an exception if illegal characters are provide to redirect_to
    [CVE-2023-28362]

    Zack Deveau

Active Job

  • No changes.

Action Mailer

  • No changes.

Action Cable

  • No changes.

Active Storage

  • No changes.

Action Mailbox

  • No changes.

Action Text

  • No changes.

Railties

  • No changes.

v7.0.5

Compare Source

Active Support

  • Fixes TimeWithZone ArgumentError.

    Niklas Häusele

Active Model

  • No changes.

Active Record

  • Type cast #attribute_changed? :from and :to options.

    Andrew Novoselac

  • Fix index_exists? when column is an array.

    Eileen M. Uchitelle

  • Handle Date objects for PostgreSQL timestamptz columns.

    Alex Ghiculescu

  • Fix collation for changing column to non-string.

    Hartley McGuire

  • Map through subtype in PostgreSQL::OID::Array.

    Jonathan Hefner

  • Store correct environment in internal_metadata when run rails db:prepare.

    fatkodima

  • Make sure ActiveRecord::Relation#sum works with objects that implement #coerce without deprecation.

    Alex Ghiculescu

  • Fix retrieving foreign keys referencing tables named like keywords in PostgreSQL and MySQL.

    fatkodima

  • Support UUIDs in Disable Joins.

    Samuel Cochran

  • Fix Active Record's explain for queries starting with comments.

    fatkodima

  • Fix incorrectly preloading through association records when middle association has been loaded.

    Joshua Young

  • Fix where.missing and where.associated for parent/child associations.

    fatkodima

  • Fix Enumerable#in_order_of to preserve duplicates.

    fatkodima

  • Fix autoincrement on primary key for mysql.

    Eileen M. Uchitelle

  • Restore ability to redefine column in create_table for Rails 5.2 migrations.

    fatkodima

  • Fix schema cache dumping of virtual columns.

    fatkodima

  • Fix Active Record grouped calculations on joined tables on column present in both tables.

    fatkodima

  • Fix mutation detection for serialized attributes backed by binary columns.

    Jean Boussier

  • Fix a bug where using groups and counts with long table names would return incorrect results.

    Shota Toguchi, Yusaku Ono

  • Fix erroneous nil default precision on virtual datetime columns.

    Prior to this change, virtual datetime columns did not have the same
    default precision as regular datetime columns, resulting in the following
    being erroneously equivalent:

    t.virtual :name, type: datetime,                 as: "expression"
    t.virtual :name, type: datetime, precision: nil, as: "expression"
    

    This change fixes the default precision lookup, so virtual and regular
    datetime column default precisions match.

    Sam Bostock

  • Fix a case where the query cache can return wrong values. See #​46044

    Aaron Patterson

Action View

  • FormBuilder#id finds id set by form_for and form_with.

    Matt Polito

  • Allow all available locales for template lookups.

    Ben Dilley

  • Choices of select can optionally contain html attributes as the last element
    of the child arrays when using grouped/nested collections

    <%= form.select :foo, [["North America", [["United States","US"],["Canada","CA"]], { disabled: "disabled" }]] %>

=> United StatesCanada

```

*Chris Gunther*

Action Pack

  • Do not return CSP headers for 304 Not Modified responses.

    Tobias Kraze

  • Fix EtagWithFlash when there is no Flash middleware available.

    fatkodima

  • Fix content-type header with send_stream.

    Elliot Crosby-McCullough

  • Address Selenium :capabilities deprecation warning.

    Ron Shinall

  • Fix cookie domain for domain: all on two letter single level TLD.

    John Hawthorn

  • Don't double log the controller, action, or namespaced_controller when using ActiveRecord::QueryLog

    Previously if you set config.active_record.query_log_tags to an array that included
    :controller, :namespaced_controller, or :action, that item would get logged twice.
    This bug has been fixed.

    Alex Ghiculescu

  • Rescue EOFError exception from rack on a multipart request.

    Nikita Vasilevsky

  • Rescue JSON::ParserError in Cookies json deserializer to discards marshal dumps:

    Without this change, if action_dispatch.cookies_serializer is set to :json and
    the app tries to read a :marshal serialized cookie, it would error out which wouldn't
    clear the cookie and force app users to manually clear it in their browser.

    (See #​45127 for original bug discussion)

    Nathan Bardoux

Active Job

  • Make delayed job display_name failsafe.

    codez

  • Don't double log the job when using ActiveRecord::QueryLog

    Previously if you set config.active_record.query_log_tags to an array that included
    :job, the job name would get logged twice. This bug has been fixed.

    Alex Ghiculescu

Action Mailer

  • No changes.

Action Cable

  • Restore Action Cable Redis pub/sub listener on connection failure.

    Vladimir Dementyev

Active Storage

  • No changes.

Action Mailbox

  • No changes.

Action Text

  • Fix ActionText::Attachable#as_json.

    Alexandre Ruban

Railties

  • Add puma app server to Gemfile in order to start test/dummy.

    Donapieppo

  • Rails console now disables IRB's autocompletion feature in production by default.

    Setting IRB_USE_AUTOCOMPLETE=true can override this default.

    Stan Lo

  • Send 303 See Other status code back for the destroy action on newly generated
    scaffold controllers.

    Tony Drake

v7.0.4.3

Compare Source

Active Support

Active Model

  • No changes.

Active Record

  • No changes.

Action View

  • Ignore certain data-* attributes in rails-ujs when element is contenteditable

    [CVE-2023-23913]

Action Pack

  • No changes.

Active Job

  • No changes.

Action Mailer

  • No changes.

Action Cable

  • No changes.

Active Storage

  • No changes.

Action Mailbox

  • No changes.

Action Text

  • No changes.

Railties

  • No changes.

v7.0.4.2

Compare Source

Active Support

  • No changes.

Active Model

  • No changes.

Active Record

  • No changes.

Action View

  • No changes.

Action Pack

  • Fix domain: :all for two letter TLD

    This fixes a compatibility issue introduced in our previous security
    release when using domain: :all with a two letter but single level top
    level domain domain (like .ca, rather than .co.uk).

Active Job

  • No changes.

Action Mailer

  • No changes.

Action Cable

  • No changes.

Active Storage

  • No changes.

Action Mailbox

  • No changes.

Action Text

  • No changes.

Railties

  • No changes.

v7.0.4.1

Compare Source

This is a security release. More information is available in our security announcements forum: https://discuss.rubyonrails.org/c/security-announcements/9

Active Support

Active Model

  • No changes.

Active Record

  • Make sanitize_as_sql_comment more strict

    Though this method was likely never meant to take user input, it was
    attempting sanitization. That sanitization could be bypassed with
    carefully crafted input.

    This commit makes the sanitization more robust by replacing any
    occurrances of "/" or "/" with "/ " or " /". It also performs a
    first pass to remove one surrounding comment to avoid compatibility
    issues for users relying on the existing removal.

    This also clarifies in the documentation of annotate that it should not
    be provided user input.

    [CVE-2023-22794]

  • Added integer width check to PostgreSQL::Quoting

    Given a value outside the range for a 64bit signed integer type
    PostgreSQL will treat the column type as numeric. Comparing
    integer values against numeric values can result in a slow
    sequential scan.

    This behavior is configurable via
    ActiveRecord::Base.raise_int_wider_than_64bit which defaults to true.

    [CVE-2022-44566]

Action View

  • No changes.

Action Pack

  • Fix sec issue with _url_host_allowed?

    Disallow certain strings from _url_host_allowed? to avoid a redirect
    to malicious sites.

    [CVE-2023-22797]

  • Avoid regex backtracking on If-None-Match header

    [CVE-2023-22795]

  • Use string#split instead of regex for domain parts

    [CVE-2023-22792]

Active Job

  • No changes.

Action Mailer

  • No changes.

Action Cable

  • No changes.

Active Storage

  • No changes.

Action Mailbox

  • No changes.

Action Text

  • No changes.

Railties

  • No changes.

v7.0.4

Compare Source

Active Support
  • Redis cache store is now compatible with redis-rb 5.0.

    Jean Boussier

  • Fix NoMethodError on custom ActiveSupport::Deprecation behavior.

    ActiveSupport::Deprecation.behavior= was supposed to accept any object
    that responds to call, but in fact its internal implementation assumed that
    this object could respond to arity, so it was restricted to only Proc objects.

    This change removes this arity restriction of custom behaviors.

    Ryo Nakamura

Active Model
  • Handle name clashes in attribute methods code generation cache.

    When two distinct attribute methods would generate similar names,
    the first implementation would be incorrectly re-used.

    class A
      attribute_method_suffix "_changed?"
      define_attribute_methods :x
    end
    
    class B
      attribute_method_suffix "?"
      define_attribute_methods :x_changed
    end

    Jean Boussier

Active Record
  • Symbol is allowed by default for YAML columns

    Étienne Barrié

  • Fix ActiveRecord::Store to serialize as a regular Hash

    Previously it would serialize as an ActiveSupport::HashWithIndifferentAccess
    which is wasteful and cause problem with YAML safe_load.

    Jean Boussier

  • Add timestamptz as a time zone aware type for PostgreSQL

    This is required for correctly parsing timestamp with time zone values in your database.

    If you don't want this, you can opt out by adding this initializer:

    ActiveRecord::Base.time_zone_aware_types -= [:timestamptz]

    Alex Ghiculescu

  • Fix supporting timezone awareness for tsrange and tstzrange array columns.

In database migrations
add_column :shops, :open_hours, :tsrange, array: true
In app config
ActiveRecord::Base.time_zone_aware_types += [:tsrange]
In the code times are properly converted to app time zone
Shop.create!(open_hours: [Time.current..8.hour.from_now])
```

*Wojciech Wnętrzak*
  • Resolve issue where a relation cache_version could be left stale.

    Previously, when reset was called on a relation object it did not reset the cache_versions
    ivar. This led to a confusing situation where despite having the correct data the relation
    still reported a stale cache_version.

    Usage:

    developers = Developer.all
    developers.cache_version
    
    Developer.update_all(updated_at: Time.now.utc + 1.second)
    
    developers.cache_version # Stale cache_version
    developers.reset
    developers.cache_version # Returns the current correct cache_version

    Fixes #​45341.

    Austen Madden

  • Fix load_async when called on an association proxy.

    Calling load_async directly an association would schedule
    a query but never use it.

    comments = post.comments.load_async # schedule a query
    comments.to_a # perform an entirely new sync query

    Now it does use the async query, however note that it doesn't
    cause the association to be loaded.

    Jean Boussier

  • Fix eager loading for models without primary keys.

    Anmol Chopra, Matt Lawrence, and Jonathan Hefner

  • rails db:schema:{dump,load} now checks ENV["SCHEMA_FORMAT"] before config

    Since rails db:structure:{dump,load} was deprecated there wasn't a simple
    way to dump a schema to both SQL and Ruby formats. You can now do this with
    an environment variable. For example:

    SCHEMA_FORMAT=sql rake db:schema:dump
    

    Alex Ghiculescu

  • Fix Hstore deserialize regression.

    edsharp

Action View
  • Guard against ActionView::Helpers::FormTagHelper#field_name calls with nil
    object_name arguments. For example:

    <%= fields do |f| %>
      <%= f.field_name :body %>
    <% end %>

    Sean Doyle

  • Strings returned from strip_tags are correctly tagged html_safe?

    Because these strings contain no HTML elements and the basic entities are escaped, they are safe
    to be included as-is as PCDATA in HTML content. Tagging them as html-safe avoids double-escaping
    entities when being concatenated to a SafeBuffer during rendering.

    Fixes rails/rails-html-sanitizer#124

    Mike Dalessio

Action Pack
  • Prevent ActionDispatch::ServerTiming from overwriting existing values in Server-Timing.

    Previously, if another middleware down the chain set Server-Timing header,
    it would overwritten by ActionDispatch::ServerTiming.

    Jakub Malinowski

Active Job
  • Update ActiveJob::QueueAdapters::QueAdapter to remove deprecation warning.

    Remove a deprecation warning introduced in que 1.2 to prepare for changes in
    que 2.0 necessary for Ruby 3 compatibility.

    Damir Zekic and Adis Hasovic

Action Mailer
  • No changes.
Action Cable
  • The Redis adapter is now compatible with redis-rb 5.0

    Compatibility with redis-rb 3.x was dropped.

    Jean Boussier

  • The Action Cable server is now mounted with anchor: true.

    This means that routes that also start with /cable will no longer clash with Action Cable.

    Alex Ghiculescu

Active Storage
  • Fixes proxy downloads of files over 5MiB

    Previously, trying to view and/or download files larger than 5mb stored in
    services like S3 via proxy mode could return corrupted files at around
    5.2mb or cause random halts in the download. Now,
    ActiveStorage::Blobs::ProxyController correctly handles streaming these
    larger files from the service to the client without any issues.

    Fixes #​44679

    Felipe Raul

Action Mailbox
  • No changes.
Action Text
  • No changes.
Railties
  • config.allow_concurrency = false now use a Monitor instead of a Mutex

    This allows to enable config.active_support.executor_around_test_case even
    when config.allow_concurrency is disabled.

    Jean Boussier

  • Skip Active Storage and Action Mailer if Active Job is skipped.

    Étienne Barrié

  • Correctly check if frameworks are disabled when running app:update.

    Étienne Barrié and Paulo Barros

  • Fixed config.active_support.cache_format_version never being applied.

    Rails 7.0 shipped with a new serializer for Rails.cache, but the associated config
    wasn't working properly. Note that even after this fix, it can only be applied from
    the application.rb file.

    Alex Ghiculescu

v7.0.3.1: 7.0.3.1

Compare Source

Active Support

  • No changes.

Active Model

  • No changes.

Active Record

  • Change ActiveRecord::Coders::YAMLColumn default to safe_load

    This adds two new configuration options The configuration options are as
    follows:

    • config.active_storage.use_yaml_unsafe_load

    When set to true, this configuration option tells Rails to use the old
    "unsafe" YAML loading strategy, maintaining the existing behavior but leaving
    the possible escalation vulnerability in place. Setting this option to true
    is not recommended, but can aid in upgrading.

    • config.active_record.yaml_column_permitted_classes

    The "safe YAML" loading method does not allow all classes to be deserialized
    by default. This option allows you to specify classes deemed "safe" in your
    application. For example, if your application uses Symbol and Time in
    serialized data, you can add Symbol and Time to the allowed list as follows:

    config.active_record.yaml_column_permitted_classes = [Symbol, Date, Time]
    

    [CVE-2022-32224]

Action View

  • No changes.

Action Pack

  • No changes.

Active Job

  • No changes.

Action Mailer

  • No changes.

Action Cable

  • No changes.

Active Storage

  • No changes.

Action Mailbox

  • No changes.

Action Text

  • No changes.

Railties

  • No changes.

v7.0.3: 7.0.3

Compare Source

Active Support

  • No changes.

Active Model

  • No changes.

Active Record

  • Some internal housekeeping on reloads could break custom respond_to?
    methods in class objects that referenced reloadable constants. See
    #​44125 for details.

    Xavier Noria

  • Fixed MariaDB default function support.

    Defaults would be written wrong in "db/schema.rb" and not work correctly
    if using db:schema:load. Further more the function name would be
    added as string content when saving new records.

    kaspernj

  • Fix remove_foreign_key with :if_exists option when foreign key actually exists.

    fatkodima

  • Remove --no-comments flag in structure dumps for PostgreSQL

    This broke some apps that used custom schema comments. If you don't want
    comments in your structure dump, you can use:

    ActiveRecord::Tasks::DatabaseTasks.structure_dump_flags = ['--no-comments']

    Alex Ghiculescu

  • Use the model name as a prefix when filtering encrypted attributes from logs.

    For example, when encrypting Person#name it will add person.name as a filter
    parameter, instead of just name. This prevents unintended filtering of parameters
    with a matching name in other models.

    Jorge Manrubia

  • Fix quoting of ActiveSupport::Duration and Rational numbers in the MySQL adapter.

    Kevin McPhillips

  • Fix change_column_comment to preserve column's AUTO_INCREMENT in the MySQL adapter

    fatkodima

Action View

  • Ensure models passed to form_for attempt to call to_model.

    Sean Doyle

Action Pack

  • Allow relative redirects when raise_on_open_redirects is enabled.

    Tom Hughes

  • Fix authenticate_with_http_basic to allow for missing password.

    Before Rails 7.0 it was possible to handle basic authentication with only a username.

    authenticate_with_http_basic do |token, _|
      ApiClient.authenticate(token)
    end

    This ability is restored.

    Jean Boussier

  • Fix content_security_policy returning invalid directives.

    Directives such as self, unsafe-eval and few others were not
    single quoted when the directive was the result of calling a lambda
    returning an array.

    content_security_policy do |policy|
      policy.frame_ancestors lambda { [:self, "https://example.com"] }
    end

    With this fix the policy generated from above will now be valid.

    Edouard Chin

  • Fix skip_forgery_protection to run without raising an error if forgery
    protection has not been enabled / verify_authenticity_token is not a
    defined callback.

    This fix prevents the Rails 7.0 Welcome Page (/) from raising an
    ArgumentError if default_protect_from_forgery is false.

    Brad Trick

  • Fix ActionController::Live to copy the IsolatedExecutionState in the ephemeral thread.

    Since its inception ActionController::Live has been copying thread local variables
    to keep things such as CurrentAttributes set from middlewares working in the controller action.

    With the introduction of IsolatedExecutionState in 7.0, some of that global state was lost in
    ActionController::Live controllers.

    Jean Boussier

  • Fix setting trailing_slash: true in route definition.

    get '/test' => "test#index", as: :test, trailing_slash: true
    
    test_path() # => "/test/"

    Jean Boussier

Active Job

  • Add missing bigdecimal require in ActiveJob::Arguments

    Could cause uninitialized constant ActiveJob::Arguments::BigDecimal (NameError)
    when loading Active Job in isolation.

    Jean Boussier

Action Mailer

  • No changes.

Action Cable

  • No changes.

Active Storage

  • Don't stream responses in redirect mode

    Previously, both redirect mode and proxy mode streamed their
    responses which caused a new thread to be created, and could end
    up leaking connections in the connection pool. But since redirect
    mode doesn't actually send any data, it doesn't need to be
    streamed.

    Luke Lau

Action Mailbox

  • No changes.

Action Text

  • No changes.

Railties

  • If reloading and eager loading are both enabled, after a reload Rails eager loads again the application code.

    Xavier Noria

  • Use controller_class_path in Rails::Generators::NamedBase#route_url

    The route_url method now returns the correct path when generating
    a namespaced controller with a top-level model using --model-name.

    Previously, when running this command:

    bin/rails generate scaffold_controller Admin/Post --model-name Post

    the comments above the controller action would look like:

GET /posts

def index
  @&#8203;posts = Post.all
end
```

afterwards, they now look like this:

``` ruby

GET /admin/posts

def index
  @&#8203;posts = Post.all
end
```

Fixes #&#8203;44662.

*Andrew White*

v7.0.2.4

Compare Source

Active Support

  • Fix and add protections for XSS in ActionView::Helpers and ERB::Util.

    Add the method ERB::Util.xml_name_escape to escape dangerous characters
    in names of tags and names of attributes, following the specification of XML.

    Álvaro Martín Fraguas

Active Model

  • No changes.

Active Record

  • No changes.

Action View

  • Fix and add protections for XSS in ActionView::Helpers and ERB::Util.

    Escape dangerous characters in names of tags and names of attributes in the
    tag helpers, following the XML specification. Rename the option
    :escape_attributes to :escape, to simplify by applying the option to the
    whole tag.

    Álvaro Martín Fraguas

Action Pack

  • Allow Content Security Policy DSL to generate for API responses.

    Tim Wade

Active Job

  • No changes.

Action Mailer

  • No changes.

Action Cable

  • No changes.

Active Storage

  • No changes.

Railties

  • No changes.

Configuration

📅 Schedule: Branch creation - "" (UTC), 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 has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot requested a review from dnsos as a code owner February 28, 2024 01:10
@renovate renovate bot changed the title chore(deps): update dependency rails to v7.0.8.1 [security] chore(deps): update dependency rails to v7.0.8.1 [security] - autoclosed Mar 2, 2024
@renovate renovate bot closed this Mar 2, 2024
@renovate renovate bot deleted the renovate/rubygems-rails-vulnerability branch March 2, 2024 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants