2022/03/09分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Add missing require to activerecord base_test.rb
activerecord/test/cases/base_test.rb
の修正です。
不足していたrequireを追加しています。
Added image trasnformation validation via configurable allow-list
Active Storageの修正です。
Active Storageの画像変換処理をimage_processing
+ mini_magick
という組み合わせで行っている、かつ、 変換処理を下記のようにユーザが指定出来るようなコードになっていた場合に、任意のコードが実行出来てしまうSecurity issueがあったのを修正しています。CVE-2022-21831。
<%= image_tag blob.variant(params[:t] => params[:v]) %>
この対策として、変換処理で使用出来るメソッド及び引数の一覧をRails内部で保持するようになっています。もし使用したい値が一覧に無い場合、config(config.active_storage.supported_image_processing_methods
、config.active_storage.unsupported_image_processing_arguments
)に自分で追加する必要があります。
Modernizes wording in the autoloading guide
rails guideのAutoloading and Reloading Constants
の修正です。
Eager Loading
の項の言い回しを修正しています。
rubocopの設定に違反している箇所があったのをまとめて修正しています。
Merge pull request #44635 from imtayadeway/tjw/api-csp-i
actionpack/lib/action_dispatch/http/content_security_policy.rb
の修正です。
Content Security Policyの生成がHTMLレスポンスの時しか出来ないようになっていたのを、HTMLレスポンス以外の場合も使用出来るよう修正しています。APIでも使用出来るようにする為。
Instrument Action Mailbox processing
actionmailbox/app/models/action_mailbox/inbound_email.rb
、
actionmailbox/lib/action_mailbox/base.rb
の修正です。
Action Mailboxのprocess
処理に対してinstrumentationを追加しています。hook名はprocess.action_mailbox
です。
ActiveSupport::OrderedOptions handle custom #dig
activesupport/lib/active_support/ordered_options.rb
の修正です。
ActiveSupport::OrderedOptions
にdig
メソッドを追加しています。[]
メソッドと同様に引数に指定されたkeyをSymbolに変換してから処理を行うようになっています。
Merge pull request #44637 from fatkodima/remove_foreign_key-if_exists
activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
、
activerecord/lib/active_record/connection_adapters/sqlite3/schema_statements.rb
の修正です。
remove_foreign_key
メソッドに:if_exists
オプションを指定した場合に、正しく動作しないバグがあったのを修正しています。