lib/contrast/agent/protect/policy/applies_xxe_rule.rb in contrast-agent-4.6.0 vs lib/contrast/agent/protect/policy/applies_xxe_rule.rb in contrast-agent-4.7.0

- old
+ new

@@ -47,20 +47,19 @@ data.rewind if data&.cs__respond_to?(:rewind) end protected - def name + def rule_name Contrast::Agent::Protect::Rule::Xxe::NAME end private - DATA_KEY = '@data'.to_sym + DATA_KEY = :@data def valid_data_input? object - object.instance_variable_defined?(DATA_KEY) && - object.instance_variable_get(DATA_KEY) + object.instance_variable_defined?(DATA_KEY) && object.instance_variable_get(DATA_KEY) end NOKOGIRI_MARKER = 'Nokogiri::' PARSER_NOKOGIRI = 'Nokogiri' OX_MARKER = 'Ox' # breaks marker pattern b/c Ox is entire classname @@ -113,14 +112,11 @@ end rescue Contrast::SecurityException => e raise e rescue StandardError => e parser ||= Contrast::Utils::ObjectShare::UNKNOWN - logger.error( - 'Error applying xxe', - e, - module: potential_parser.cs__class.cs__name, - method: method, parser: parser) + logger.error('Error applying xxe', e, module: potential_parser.cs__class.cs__name, method: method, + parser: parser) end end end end end