Skip to content

Commit

Permalink
Land #18945, Fix crash when running http crawler with database connected
Browse files Browse the repository at this point in the history
  • Loading branch information
dwelch-r7 authored Mar 12, 2024
2 parents b52d79e + 9a9c27b commit d88185b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/metasploit/framework/common_engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ module Metasploit::Framework::CommonEngine
if ActiveRecord.respond_to?(:legacy_connection_handling=)
ActiveRecord.legacy_connection_handling = false
end

# @see https://github.com/rapid7/metasploit_data_models/blob/54a17149d5ccd0830db742d14c4987b48399ceb7/lib/metasploit_data_models/yaml.rb#L10
# @see https://github.com/rapid7/metasploit_data_models/blob/54a17149d5ccd0830db742d14c4987b48399ceb7/lib/metasploit_data_models/base64_serializer.rb#L28-L31
ActiveRecord.yaml_column_permitted_classes = (ActiveRecord.yaml_column_permitted_classes + MetasploitDataModels::YAML::PERMITTED_CLASSES).uniq

#
# `initializer`s
#
Expand Down

0 comments on commit d88185b

Please sign in to comment.