lib/contrast/agent/protect/rule/utils/builders.rb in contrast-agent-7.4.0 vs lib/contrast/agent/protect/rule/utils/builders.rb in contrast-agent-7.4.1

- old
+ new

@@ -27,12 +27,12 @@ # story of the attack # @return [Contrast::Agent::Reporting::AttackResult] the attack result from # this input def build_attack_with_match context, ia_result, result, candidate_string, **kwargs result ||= build_attack_result(context) - update_successful_attack_response(context, ia_result, result, candidate_string) append_sample(context, ia_result, result, candidate_string, **kwargs) + update_successful_attack_response(context, ia_result, result, candidate_string) result end # A given input, candidate_string, was determined to violate a @@ -51,12 +51,12 @@ # story of the attack # @return [Contrast::Agent::Reporting::AttackResult] the attack result from # this input def build_attack_without_match context, ia_result, result, **kwargs result ||= build_attack_result(context) - update_perimeter_attack_response(context, ia_result, result) append_sample(context, ia_result, result, nil, **kwargs) + update_perimeter_attack_response(context, ia_result, result) result end # Set up an attack result for the current rule @@ -95,14 +95,13 @@ # # @param context [Contrast::Agent::RequestContext] current request contest # @param potential_attack_string [String] def build_violation context, potential_attack_string result = build_attack_result(context) + append_sample(context, nil, result, potential_attack_string) update_successful_attack_response(context, nil, result, potential_attack_string) return unless result - append_sample(context, nil, result, potential_attack_string) - cef_logging(result, :successful_attack) result end end end end