This commit is contained in:
erwanlr
2021-06-08 12:58:57 +02:00
parent 058eac160f
commit 145cae912b

View File

@@ -11,7 +11,11 @@ module WPScan
# @return [ Hash ]
def self.all_df_data
@all_df_data ||= YAML.safe_load(File.read(df_file), [Regexp])
@all_df_data ||= if Gem::Version.new(Psych::VERSION) >= Gem::Version.new('4.0.0')
YAML.safe_load(File.read(df_file), permitted_classes: [Regexp])
else
YAML.safe_load(File.read(df_file), [Regexp])
end
end
# @return [ Array<Symbol> ]