Sha256: 8b66706e4e49fd95aff06bf4a8c8b36d9b1d0e5bce875f7b7783a4693f5bdb43

Contents?: true

Size: 625 Bytes

Versions: 11

Compression:

Stored size: 625 Bytes

Contents

# Copyright (c) 2021 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
# frozen_string_literal: true

module Contrast
  # 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.
  class SecurityException < StandardError
    def initialize rule, message = nil
      super(message || "Rule #{ rule.rule_name } threw a security exception")
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
contrast-agent-4.14.1 lib/contrast/security_exception.rb
contrast-agent-4.14.0 lib/contrast/security_exception.rb
contrast-agent-4.13.1 lib/contrast/security_exception.rb
contrast-agent-4.13.0 lib/contrast/security_exception.rb
contrast-agent-4.12.0 lib/contrast/security_exception.rb
contrast-agent-4.11.0 lib/contrast/security_exception.rb
contrast-agent-4.10.0 lib/contrast/security_exception.rb
contrast-agent-4.9.1 lib/contrast/security_exception.rb
contrast-agent-4.9.0 lib/contrast/security_exception.rb
contrast-agent-4.8.0 lib/contrast/security_exception.rb
contrast-agent-4.7.0 lib/contrast/security_exception.rb