Package: rails / 2:6.0.3.7+dfsg-2+deb11u2
Metadata
Package | Version | Patches format |
---|---|---|
rails | 2:6.0.3.7+dfsg-2+deb11u2 | 3.0 (quilt) |
Patch series
view the series filePatch | File delta | Description |
---|---|---|
0001 Be careful with that bundler.patch | (download) |
railties/lib/rails/generators/app_base.rb |
4 2 + 2 - 0 ! |
be careful with that bundler |
0002 disable uglify in activestorage rollup config js.patch | (download) |
activestorage/rollup.config.js |
18 9 + 9 - 0 ! |
rollup-plugin-uglify is not packaged, hence disabling it. |
use system yarnpkg.patch | (download) |
railties/lib/rails/app_updater.rb |
2 1 + 1 - 0 ! |
use system yarnpkg instead of yarn In Debian, yarn is packaged as "yarnpkg". . This patch will replace all the "bin/yarn" usages to "bin/yarnpkg". |
use system webpacker.patch | (download) |
railties/test/isolation/assets/package.json |
4 2 + 2 - 0 ! |
use system webpacker |
relax dependencies.patch | (download) |
Gemfile |
4 1 + 3 - 0 ! |
relax dependencies This patch will relax the dependencies version, remove useless dependencies, or replace the gems to which is already in Debian. . Relax dependencies version: * selenium-webdriver . Remove/replace dependencies: * minitest-bisect + Not packaged in Debian + Not used (minitest is used) * minitest-retry + Not packaged in Debian + Used only when running on Buildkite CI * webdrivers + Not packaged in Debian + Could be replaced by chromedriver-helper (ruby-chromedriver-helper) |
relax dependency sqlite3.patch | (download) |
Gemfile |
2 1 + 1 - 0 ! |
relax dependency version - ruby-sqlite3 From Rails 6, it started using `execute_batch2` function [1] which was introduced in gem sqlite3 1.4.0. This new function was confirmed at [1] that extremely faster than old `execute_batch` function. However, gem sqlite3 1.4.0 was not packaged in Debian yet (ruby-sqlite3 is 1.3.13-1+b2 in Debian), so this function could not be used. . This patch will rollback the `execute_batch2` usages to `execute_batch`. This patch should be removed after the ruby-sqlite3 upgraded to 1.4.0. . [1] https://github.com/rails/rails/commit/0908184e4c2dca5b941030bbd0d5eb2dfcfed120 |
remove ignored dependencies.patch | (download) |
Gemfile |
31 0 + 31 - 0 ! |
remove ignored dependencies |
skip test internet access.patch | (download) |
activesupport/Rakefile |
2 1 + 1 - 0 ! |
skip the tests which need internet access .. due to Debian policy 4.9. |
skip test unpackaged dependencies.patch | (download) |
actioncable/Rakefile |
2 1 + 1 - 0 ! |
skip the test due to unpackaged dependencies * websocket-client-simple + actioncable/client_test.rb * sneakers + actionjob/Rakefile + actionjob/test/cases/exceptions_test.rb * que + actionjob/Rakefile * queue_classic + actionjob/Rakefile * resque + actionjob/Rakefile * sucker_punch + actionjob/Rakefile * backburner + actionjob/Rakefile * minitest-retry + railties/test/isolation/abstract_unit.rb |
skip test railties postgresql.patch | (download) |
railties/test/application/bin_setup_test.rb |
2 2 + 0 - 0 ! |
skip the railties test which needs postgresql instance |
ignore test stuck.patch | (download) |
railties/test/generators/app_generator_test.rb |
2 2 + 0 - 0 ! |
ignore test which goes stuck Ignore the test case which makes test stuck. |
adapt to babel7.patch | (download) |
activestorage/.babelrc |
8 0 + 8 - 0 ! |
adapt to babel7 |
replace webdrivers.patch | (download) |
railties/lib/rails/generators/rails/app/templates/Gemfile.tt |
2 0 + 2 - 0 ! |
replace webdrivers webdrivers can only go to contrib section |
relax marcel.patch | (download) |
activestorage/activestorage.gemspec |
2 1 + 1 - 0 ! |
relax marcel for bullseye. |
CVE 2021 22942 1.patch | (download) |
actionpack/lib/action_dispatch/middleware/host_authorization.rb |
2 1 + 1 - 0 ! |
[patch] remove unnessary escape char in regexp Fix the test by defining a valid host on the mocked requests. |
CVE 2021 22942 2.patch | (download) |
actionpack/lib/action_dispatch/middleware/host_authorization.rb |
20 7 + 13 - 0 ! |
[patch] refactor cve-2021-22881 fix Follow-up to 83a6ac3fee8fd538ce7e0088913ff54f0f9bcb6f. This allows `HTTP_HOST` to be omitted as before, and reduces the number of object allocations per request. Benchmark: ```ruby # frozen_string_literal: true require "benchmark/memory" HOST = "example.com:80" BEFORE_REGEXP = /\A(?<host>[a-z0-9.-]+|\[[a-f0-9]*:[a-f0-9.:]+\])(:\d+)?\z/ AFTER_REGEXP = /(?:\A|,[ ]?)([a-z0-9.-]+|\[[a-f0-9]*:[a-f0-9.:]+\])(?::\d+)?\z/i Benchmark.memory do |x| x.report("BEFORE (non-nil X-Forwarded-Host)") do origin_host = BEFORE_REGEXP.match(HOST.to_s.downcase)[:host] forwarded_host = BEFORE_REGEXP.match(HOST.to_s.split(/,\s?/).last)[:host] end x.report("BEFORE (nil X-Forwarded-Host)") do origin_host = BEFORE_REGEXP.match(HOST.to_s.downcase)[:host] forwarded_host = BEFORE_REGEXP.match(nil.to_s.split(/,\s?/).last) end x.report("AFTER (non-nil X-Forwarded-Host)") do origin_host = HOST&.slice(AFTER_REGEXP, 1) || "" forwarded_host = HOST&.slice(AFTER_REGEXP, 1) || "" end x.report("AFTER (nil X-Forwarded-Host)") do origin_host = HOST&.slice(AFTER_REGEXP, 1) || "" forwarded_host = nil&.slice(AFTER_REGEXP, 1) || "" end end ``` Results: ``` BEFORE (non-nil X-Forwarded-Host) 616.000 memsize ( 208.000 retained) 9.000 objects ( 2.000 retained) 2.000 strings ( 1.000 retained) BEFORE (nil X-Forwarded-Host) 328.000 memsize ( 0.000 retained) 5.000 objects ( 0.000 retained) 2.000 strings ( 0.000 retained) AFTER (non-nil X-Forwarded-Host) 248.000 memsize ( 168.000 retained) 3.000 objects ( 1.000 retained) 1.000 strings ( 0.000 retained) AFTER (nil X-Forwarded-Host) 40.000 memsize ( 0.000 retained) 1.000 objects ( 0.000 retained) 1.000 strings ( 0.000 retained) ``` [CVE-2021-22942] |
CVE 2021 44528.patch | (download) |
actionpack/lib/action_dispatch/middleware/host_authorization.rb |
10 3 + 7 - 0 ! |
[patch] fix invalid forwarded host vulnerability Prior to this commit, it was possible to pass an unvalidated host through the `X-Forwarded-Host` header. If the value of the header was prefixed with a invalid domain character (for example a `/`), it was always accepted as the actual host of that request. Since this host is used for all url helpers, an attacker could change generated links and redirects. If the header is set to `X-Forwarded-Host: //evil.hacker`, a redirect will be send to `https:////evil.hacker/`. Browsers will ignore these four slashes and redirect the user. [CVE-2021-44528] |
CVE 2021 22942 3.patch | (download) |
actionpack/lib/action_dispatch/middleware/host_authorization.rb |
2 2 + 0 - 0 ! |
[patch] merge pull request #43868 from rails/fix-default-hosts Allow localhost with a port by default in development |
CVE 2021 22942 4.patch | (download) |
actionpack/lib/action_dispatch/middleware/host_authorization.rb |
9 5 + 4 - 0 ! |
[patch] merge pull request #43871 from rails/rm-fix-hosts-with-port Allow any allowed host with port |
CVE 2021 22942 5.patch | (download) |
actionpack/lib/action_dispatch/middleware/host_authorization.rb |
36 27 + 9 - 0 ! |
[patch] merge pull request #43882 from rails/rm-allow-ip-with-port Allow IPs with port in the HostAuthorization middleware |
CVE 2022 21831.patch | (download) |
activestorage/lib/active_storage.rb |
10 6 + 4 - 0 ! |
[patch] added image transformation validation via configurable allow-list. ImageProcessingTransformer now offers a configurable allow-list for transformation methods in addition to a configurable deny-list for arguments. [CVE-2022-21831] |
CVE 2022 22577.patch | (download) |
actionpack/lib/action_dispatch/http/content_security_policy.rb |
7 0 + 7 - 0 ! |
[patch] merge pull request #44635 from imtayadeway/tjw/api-csp-i Generate content security policy for non-HTML responses |
CVE 2022 23633 1.patch | (download) |
actionpack/lib/action_dispatch/middleware/executor.rb |
2 1 + 1 - 0 ! |
[patch] actiondispatch::executor don't fully trust `body#close` Under certain circumstances, the middleware isn't informed that the response body has been fully closed which result in request state not being fully reset before the next request. [CVE-2022-23633] |
CVE 2022 23633 2.patch | (download) |
activesupport/lib/active_support/reloader.rb |
2 1 + 1 - 0 ! |
[patch] fix reloader to work with new executor signature This is a follow up to [CVE-2022-23633]. |
CVE 2022 27777 1.patch | (download) |
actionview/lib/action_view/helpers/tag_helper.rb |
39 35 + 4 - 0 ! |
[patch] fix and add protections for xss in names. 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. Use that method in the tag helpers of ActionView::Helpers. Add a deprecation warning to the option :escape_attributes mentioning the new behavior and the transition to :escape, to simplify by applying the option to the whole tag. [CVE-2022-27777] |
CVE 2022 27777 2.patch | (download) |
actionview/test/template/tag_helper_test.rb |
2 2 + 0 - 0 ! |
[patch] merge pull request #45027 from rails/fix-tag-helper-regression Fix tag helper regression |
CVE 2023 22792.patch | (download) |
actionpack/lib/action_dispatch/middleware/cookies.rb |
48 28 + 20 - 0 ! |
[patch] use string#split instead of regex for domain parts [CVE-2023-22792] |
CVE 2023 22794 1.patch | (download) |
activerecord/test/cases/adapters/mysql2/annotate_test.rb |
37 0 + 37 - 0 ! |
[patch] should `regexp.escape` quoted table name in regex It is for agnostic test case, since quoted table name may include `.` for all adapters, and `[` / `]` for sqlserver adapter. |
CVE 2023 22794 2.patch | (download) |
activerecord/lib/active_record/connection_adapters/abstract/quoting.rb |
11 10 + 1 - 0 ! |
[patch] 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] |
CVE 2023 22795.patch | (download) |
actionpack/lib/action_dispatch/http/cache.rb |
2 1 + 1 - 0 ! |
[patch] avoid regex backtracking on if-none-match header [CVE-2023-22795] |
CVE 2023 22796.patch | (download) |
activesupport/lib/active_support/inflector/methods.rb |
3 1 + 2 - 0 ! |
[patch] avoid regex backtracking in inflector.underscore [CVE-2023-22796] |
CVE 2023 23913.patch | (download) |
actionview/app/assets/javascripts/rails-ujs/features/disable.coffee |
9 8 + 1 - 0 ! |
[patch] ignore certain data-* attributes in rails-ujs when element is contenteditable There is a potential DOM based cross-site scripting issue in rails-ujs which leverages the Clipboard API to target HTML elements that are assigned the contenteditable attribute. This has the potential to occur when pasting malicious HTML content from the clipboard that includes a data-method, data-disable-with or data-remote attribute. [CVE-2023-23913] |
CVE 2023 28120.patch | (download) |
activesupport/lib/active_support/core_ext/string/output_safety.rb |
4 4 + 0 - 0 ! |
[patch] implement safebuffer#bytesplice |