File tree Expand file tree Collapse file tree
app/models/metasploit/credential Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828 build :
2929 uses : rapid7/metasploit-framework/.github/workflows/shared_gem_verify_rails.yml@master
3030 with :
31+ additional_rails_versions : ' ["~> 8.0.0"]'
3132 dependencies : ' ["libpcap-dev", "graphviz"]'
3233 test_commands : |
3334 cp spec/dummy/config/database.yml.github_actions spec/dummy/config/database.yml
Original file line number Diff line number Diff line change @@ -38,7 +38,8 @@ group :development, :test do
3838 # code coverage of tests
3939 gem 'simplecov' , :require => false
4040 # dummy app
41- gem 'rails' , '7.0.8'
41+ # Allow Rails 7.0 through 8.0 for upgrade compatibility
42+ gem 'rails' , '>= 7.0' , '< 8.1'
4243 # running documentation generation tasks and rspec tasks
4344 gem 'rake'
4445 # unit testing framework with rails integration
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ class Metasploit::Credential::KrbEncKey < Metasploit::Credential::PasswordHash
7373 # Callbacks
7474 #
7575
76- if ActiveRecord ::VERSION ::MAJOR >= 7 && ActiveRecord ::VERSION ::MINOR >= 1
76+ if ActiveRecord ::VERSION ::MAJOR > 7 || ( ActiveRecord :: VERSION :: MAJOR == 7 && ActiveRecord ::VERSION ::MINOR >= 1 )
7777 serialize :data , coder : Metasploit ::Credential ::CaseInsensitiveSerializer
7878 else
7979 serialize :data , Metasploit ::Credential ::CaseInsensitiveSerializer
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ class Metasploit::Credential::NTLMHash < Metasploit::Credential::ReplayableHash
4343
4444 # Hash results are always downcased when stored in the database
4545 # This serializer allows for ORM to search in a case-insensitive
46- if ActiveRecord ::VERSION ::MAJOR >= 7 && ActiveRecord ::VERSION ::MINOR >= 1
46+ if ActiveRecord ::VERSION ::MAJOR > 7 || ( ActiveRecord :: VERSION :: MAJOR == 7 && ActiveRecord ::VERSION ::MINOR >= 1 )
4747 serialize :data , coder : Metasploit ::Credential ::CaseInsensitiveSerializer
4848 else
4949 serialize :data , Metasploit ::Credential ::CaseInsensitiveSerializer
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class Metasploit::Credential::PostgresMD5 < Metasploit::Credential::ReplayableHa
1313 # Callbacks
1414 #
1515
16- if ActiveRecord ::VERSION ::MAJOR >= 7 && ActiveRecord ::VERSION ::MINOR >= 1
16+ if ActiveRecord ::VERSION ::MAJOR > 7 || ( ActiveRecord :: VERSION :: MAJOR == 7 && ActiveRecord ::VERSION ::MINOR >= 1 )
1717 serialize :data , coder : Metasploit ::Credential ::CaseInsensitiveSerializer
1818 else
1919 serialize :data , Metasploit ::Credential ::CaseInsensitiveSerializer
Original file line number Diff line number Diff line change @@ -55,8 +55,6 @@ class Application < Rails::Application
5555 # like if you have constraints or database-specific column types
5656 config . active_record . schema_format = :sql
5757
58- config . autoloader = :zeitwerk
59-
6058 if ActiveRecord . respond_to? ( :legacy_connection_handling )
6159 ActiveRecord . legacy_connection_handling = false
6260 end
You can’t perform that action at this time.
0 commit comments