Skip to content

Commit b87ef99

Browse files
committed
Bump rails version to 7.2
1 parent b39d45c commit b87ef99

File tree

7 files changed

+136
-223
lines changed

7 files changed

+136
-223
lines changed

config/application.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,13 @@ class Application < Rails::Application
4141
config.paths['config/database'] = [Metasploit::Framework::Database.configurations_pathname.try(:to_path)]
4242
config.autoloader = :zeitwerk
4343

44-
config.load_defaults 7.1
44+
config.load_defaults 7.2
45+
46+
if config.respond_to?(:active_record)
47+
# Timecop in tests followed by db interaction causes a ActiveRecord::InvalidMigrationTimestampError
48+
# due to the current time (set by timecop) being less than the migration timestamp.
49+
config.active_record.validate_migration_timestamps = false
50+
end
4551

4652
config.eager_load = false
4753
end

db/schema.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
# It's strongly recommended that you check this file into your version control system.
1212

13-
ActiveRecord::Schema[7.1].define(version: 2025_02_04_172657) do
13+
ActiveRecord::Schema[7.2].define(version: 2025_02_04_172657) do
1414
# These are extensions that must be enabled in order to support this database
1515
enable_extension "plpgsql"
1616

@@ -803,5 +803,4 @@
803803
t.boolean "limit_to_network", default: false, null: false
804804
t.boolean "import_fingerprint", default: false
805805
end
806-
807806
end

lib/metasploit/framework/rails_version_constraint.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module Metasploit
44
module Framework
55
module RailsVersionConstraint
6-
RAILS_VERSION = '~> 7.1.0'
6+
RAILS_VERSION = '~> 7.2.0'
77
end
88
end
99
end

lib/msf/core/db_manager/cred.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def creds(opts)
1616
query = query.includes(logins: [ :service, { service: :host } ])
1717

1818
if opts[:type].present?
19-
query = query.where('"metasploit_credential_privates"."type" = ?', opts[:type])
19+
query = query.where('"metasploit_credential_privates"."type" = ?', opts[:type].to_s)
2020
end
2121

2222
if opts[:jtr_format].present?

lib/msf/core/exploit/remote/mysql.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def mysql_login(user='root', pass='', db=nil)
4343
begin
4444
self.mysql_conn = ::Rex::Proto::MySQL::Client.connect(rhost, user, pass, db, rport, io: self.sock)
4545
# Deprecating this in favor off `mysql_conn`
46-
@mysql_handle = ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new(self, :mysql_conn, :@mysql_handle, ActiveSupport::Deprecation.new)
46+
@mysql_handle = ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new(self, :mysql_conn, :@mysql_handle, deprecator: ActiveSupport::Deprecation.new)
4747

4848
rescue Errno::ECONNREFUSED
4949
print_error("Connection refused")

metasploit-framework.gemspec

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ Gem::Specification.new do |spec|
219219
# SSH server library with ed25519
220220
spec.add_runtime_dependency 'hrr_rb_ssh-ed25519'
221221
# Needed for irb internal command
222-
spec.add_runtime_dependency 'irb', '~> 1.7.4'
222+
spec.add_runtime_dependency 'irb'
223223

224224
# AWS enumeration modules
225225
spec.add_runtime_dependency 'aws-sdk-s3'
@@ -248,10 +248,6 @@ Gem::Specification.new do |spec|
248248
# to generate PNG files, not to parse untrusted PNG files.
249249
spec.add_runtime_dependency 'chunky_png'
250250

251-
# Temporary, remove once the Rails 7.1 update is complete
252-
# see: https://stackoverflow.com/questions/79360526/uninitialized-constant-activesupportloggerthreadsafelevellogger-nameerror
253-
spec.add_runtime_dependency 'concurrent-ruby', '1.3.4'
254-
255251
# Needed for multiline REPL support for interactive SQL sessions
256252
spec.add_runtime_dependency 'reline'
257253

0 commit comments

Comments
 (0)