Exception: WSDL::UnsafeRedirectError
- Inherits:
-
FatalError
- Object
- StandardError
- Error
- FatalError
- WSDL::UnsafeRedirectError
- Defined in:
- lib/wsdl/errors.rb
Overview
Raised when an HTTP redirect targets a restricted destination.
This error prevents SSRF (Server-Side Request Forgery) attacks where a malicious WSDL endpoint redirects to internal network addresses such as cloud metadata services, loopback interfaces, or RFC 1918 private networks.
Instance Attribute Summary collapse
-
#target_url ⇒ String?
readonly
The redirect target URL that was blocked.
Instance Method Summary collapse
-
#initialize(message = nil, target_url: nil) ⇒ UnsafeRedirectError
constructor
Creates a new UnsafeRedirectError.
Constructor Details
#initialize(message = nil, target_url: nil) ⇒ UnsafeRedirectError
Creates a new UnsafeRedirectError.
479 480 481 482 |
# File 'lib/wsdl/errors.rb', line 479 def initialize( = nil, target_url: nil) @target_url = target_url super() end |
Instance Attribute Details
#target_url ⇒ String? (readonly)
Returns the redirect target URL that was blocked.
473 474 475 |
# File 'lib/wsdl/errors.rb', line 473 def target_url @target_url end |