Possible Remote Code Execution Exploit in Rails Development Mode
There is a possible a possible remote code executing exploit in Rails when in
development mode. This vulnerability has been assigned the CVE identifier
CVE-2019-5420.
With some knowledge of a target application it is possible for an attacker to
guess the automatically generated development mode secret token. This secret
token can be used in combination with other Rails internals to escalate to a
remote code execution exploit.
All users running an affected release should either upgrade or use one of the
workarounds immediately.
Releases
The 6.0.0.beta3 and 5.2.2.1 releases are available at the normal locations.
Workarounds
This issue can be mitigated by specifying a secret key in development mode.
In "config/environments/development.rb" add this:
config.secret_key_base = SecureRandom.hex(64)
Credits
Thanks to ooooooo_q
🚨 We recommend to merge and deploy this update as soon as possible! 🚨
Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request.
Do not ignore the scoping with query methods in the scope block.
Ryuta Kamizono
Allow aliased attributes to be used in #update_columns and #update.
Gannon McGibbon
Allow spaces in postgres table names.
Fixes issue where "user post" is misinterpreted as ""user"."post"" when quoting table names with the postgres
adapter.
Gannon McGibbon
Cached columns_hash fields should be excluded from ResultSet#column_types
PR #34528 addresses the inconsistent behaviour when attribute is defined for an ignored column. The following test
was passing for SQLite and MySQL, but failed for PostgreSQL:
classDeveloperName < ActiveRecord::Type::Stringdefdeserialize(value)
"Developer: #{value}"endendclassAttributedDeveloper < ActiveRecord::Baseself.table_name ="developers"
attribute :name, DeveloperName.newself.ignored_columns += ["name"]
end
developer =AttributedDeveloper.create
developer.update_column :name, "name"
loaded_developer =AttributedDeveloper.where(id: developer.id).select("*").first
puts loaded_developer.name # should be "Developer: name" but it's just "name"
Dmitry Tsepelev
Values of enum are frozen, raising an error when attempting to modify them.
Emmanuel Byrd
update_columns now correctly raises ActiveModel::MissingAttributeError
if the attribute does not exist.
Sean Griffin
Do not use prepared statement in queries that have a large number of binds.
Ryuta Kamizono
Fix query cache to load before first request.
Eileen M. Uchitelle
Fix collection cache key with limit and custom select to avoid ambiguous timestamp column error.
Fix duplicated record creation when using nested attributes with create_with.
Darwin Wu
Fix regression setting children record in parent before_save callback.
Guo Xiang Tan
Prevent leaking of user's DB credentials on rails db:create failure.
bogdanvlviv
Clear mutation tracker before continuing the around callbacks.
Yuya Tanaka
Prevent deadlocks when waiting for connection from pool.
Brent Wheeldon
Avoid extra scoping when using Relation#update that was causing this method to change the current scope.
Ryuta Kamizono
Fix numericality validator not to be affected by custom getter.
Ryuta Kamizono
Fix bulk change table ignores comment option on PostgreSQL.
Yoshiyuki Kinjo
Action View
No changes.
Action Pack
Reset Capybara sessions if failed system test screenshot raising an exception.
Reset Capybara sessions if take_failed_screenshot raise exception
in system test after_teardown.
Maxim Perepelitsa
Use request object for context if there's no controller
There is no controller instance when using a redirect route or a
mounted rack application so pass the request object as the context
when resolving dynamic CSP sources in this scenario.
Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.
All Depfu comment commands
@depfu rebase
Rebases against your default branch and redoes this update
@depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@depfu reopen
Restores the branch and reopens this PR (if it's closed)
@depfu pause
Ignores all future updates for this dependency and closes this PR
@depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)
🚨 Your version of railties has known security vulnerabilities 🚨
Advisory: CVE-2019-5420 Disclosed: March 13, 2019 URL: https://groups.google.com/forum/#!topic/rubyonrails-security/IsQKvDqZdKw
Possible Remote Code Execution Exploit in Rails Development Mode
🚨 We recommend to merge and deploy this update as soon as possible! 🚨
Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request.
What changed?
✳️ rails (5.1.6.1 → 5.2.2.1) · Repo
Release Notes
5.2.2
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ actioncable (indirect, 5.1.6.1 → 5.2.2.1) · Repo · Changelog
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ actionmailer (indirect, 5.1.6.1 → 5.2.2.1) · Repo · Changelog
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ actionpack (indirect, 5.1.6.1 → 5.2.2.1) · Repo · Changelog
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ actionview (indirect, 5.1.6.1 → 5.2.2.1) · Repo · Changelog
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ activejob (indirect, 5.1.6.1 → 5.2.2.1) · Repo · Changelog
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ activemodel (indirect, 5.1.6.1 → 5.2.2.1) · Repo · Changelog
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ activerecord (indirect, 5.1.6.1 → 5.2.2.1) · Repo · Changelog
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ activesupport (indirect, 5.1.6.1 → 5.2.2.1) · Repo · Changelog
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ arel (indirect, 8.0.0 → 9.0.0) · Repo · Changelog
Commits
See the full diff on Github. The new version differs by 52 commits:
Prepare for 9.0.0
Merge pull request #501 from abelards/patch-1
Merge pull request #502 from kddeisz/count-math
Allow count nodes to have math functions
Update README.md
Merge pull request #500 from jcoleman/fix_incorrect_typecasting_of_raw_sql_strings
Type-castable attributes should not try to cast SqlLiteral nodes
Merge pull request #496 from amatsuda/froms_to_nowhere
Merge pull request #499 from jgraichen/jg/cte-bindparams
Support BindParams in subqueries
Merge pull request #498 from yhirano55/update_travis
Update .travis.yml
Unused variables
Merge pull request #495 from koic/add_required_ruby_version_to_gemspec
Update travis.yml
Add required_ruby_version to gemspec
Merge pull request #494 from koic/remove_encoding_utf8_magic_comment
Remove encoding utf-8 magic comment
Merge pull request #493 from gaurish/patch-1
Remove Unused variable - offset_bind
Merge pull request #492 from mikaji/ci_against_2.4.1
Merge pull request #491 from yahonda/follow_up_add_bind_for_oracle_visitor
CI against 2.4.1
Address `undefined method `value_for_database'` in Oracle visitor
Change the verison to 9.0.0.alpha
Merge pull request #490 from MaxLap/fix_nodes_hash_eql_eqeq
Add missing hash, eql?, == to various node classes
Merge pull request #489 from kamipo/remove_unused_bind_values
Remove unused `bind_values`
Fix test failures
Adjust `BindParam` as needed for AR
Add a collector to grab the bind values off the AST
Ensure `ToSql` collector returns a UTF-8 string
Refactor `substitute_binds` to perform substitution immediately
Add a value field `Nodes::BindParam`
Rename `Collectors::Bind`
Merge pull request #484 from kirs/multiple-insert-v2
Merge pull request #472 from film42/master
Test concurrency of visitor superclass fallback
Support INSERT with multiple values
Merge pull request #483 from kamipo/remove_unused_engine
Add regression test
Revert "Merge pull request #482 from kirs/multiple-insert"
Merge pull request #482 from kirs/multiple-insert
Remove unused `engine`
Support multiple inserts
Merge pull request #475 from PedroSena/chainable-insert
Made InsertManager#insert chainable
Merge pull request #474 from JaKXz/patch-1
docs(distinct): tweaks [skip ci]
docs(distinct): fix distinct example [skip ci]
docs: add distinct to README
↗️ concurrent-ruby (indirect, 1.1.4 → 1.1.5) · Repo · Changelog
Release Notes
1.1.5 (from changelog)
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ i18n (indirect, 1.5.2 → 1.6.0) · Repo · Changelog
↗️ mini_mime (indirect, 1.0.0 → 1.0.1) · Repo · Changelog
Commits
See the full diff on Github. The new version differs by 12 commits:
Merge branch 'master' of github.com:discourse/mini_mime
bump version
Merge pull request #14 from ahorek/replace_sub
Update mime types from upstream
Merge pull request #13 from ahorek/lookup_by_ext
replace sub
expose lookup by extension
Fix typos.
Merge pull request #11 from attritionorg/patch-1
Update LICENSE.txt with an actual name
Merge pull request #10 from esparta/adjusting_lookup_by_filename
Adjusting lookup_by_filename on performance & style
↗️ railties (indirect, 5.1.6.1 → 5.2.2.1) · Repo · Changelog
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ websocket-driver (indirect, 0.6.5 → 0.7.0) · Repo · Changelog
Commits
See the full diff on Github. The new version differs by 17 commits:
Fix the version of Rubygems that Travis is using on Ruby 1.9.
Bump version to 0.7.0.
Refactor the client examples, and get the TCPSocket one into a runnable state so it can be run from the command line with a URI.
Don't require rubygems, this has not been necessary since Ruby 1.8.
Merge pull request #53 from izwick-schachter/master
Added TCPSocket client example
Rename tcp_server.rb to em_server.rb.
Add an example EventMachine client.
Flesh out the docs for the new ping/pong events.
Make the ping/pong tests check the content of the events.
Emit ping and pong events after all other effects of those frames have been carried out.
Merge pull request #51 from ably-forks/support-ping-in-event-emitter
Update Ruby versions in Travis config.
Update docs to reflect ping & pong events
Emit :ping and :pong events in the driver
Merge pull request #50 from junaruga/feature/travis-ruby-head
Update Ruby 2.3, 2.4 to latest version on Travis.
🆕 activestorage (added, 5.2.2.1)
🆕 marcel (added, 0.3.3)
🆕 mimemagic (added, 0.3.3)
Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with
@depfu rebase
.All Depfu comment commands