lib/contrast/agent/protect/rule/xxe.rb in contrast-agent-3.13.2 vs lib/contrast/agent/protect/rule/xxe.rb in contrast-agent-3.14.0

- old
+ new

@@ -1,10 +1,10 @@ # Copyright (c) 2020 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details. # frozen_string_literal: true -cs__scoped_require 'contrast/agent/protect/rule/base' -cs__scoped_require 'contrast/utils/timer' +require 'contrast/agent/protect/rule/base' +require 'contrast/utils/timer' module Contrast module Agent module Protect module Rule @@ -48,17 +48,15 @@ # For our definition, the prolog goes from the start of the XML # string to the end of the last entity declaration. xxe_details.xml = Contrast::Utils::StringUtils.protobuf_safe_string(xml[0, last_idx]) ia_result = build_evaluation(xxe_details.xml) - result = build_attack_with_match( + build_attack_with_match( context, ia_result, nil, nil, details: xxe_details) - - result end def build_details xml, _evaluation = nil last_idx = 0 ss = StringScanner.new(xml)