Exception: Contrast::SecurityException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/contrast/security_exception.rb

Overview

A custom exception raised by our Protect rules in order to prevent malicious user input from completing an attack. This Exception purposefully extends StandardError and not SecurityError as StandardError is more likely to be handled by our customer’s applications.

Instance Method Summary collapse

Constructor Details

#initialize(rule, message = nil) ⇒ SecurityException

Returns a new instance of SecurityException.



10
11
12
# File 'lib/contrast/security_exception.rb', line 10

def initialize rule, message = nil
  super(message || "Rule #{ rule.rule_name } threw a security exception")
end