Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AreAllAssociatedIPsAllowed ¶
AreAllAssociatedIPsAllowed fails if one of the pairs is failing.
func IsAssociatedIPAllowed ¶
IsAssociatedIPAllowed returns nil for a domain (with NS lookup), IP, or IPv6 address if it does not resolve to a private IP subnet. This is a first level of defense against SSRF attacks by disallowing any domain or IP to resolve to a private network range.
Please keep in mind that validations for domains is valid only when looking up. A malicious actor could easily update the DSN record post validation to point to an internal IP
func IsAssociatedIPAllowedWhenSet ¶
IsAssociatedIPAllowedWhenSet is a wrapper for IsAssociatedIPAllowed which returns valid when ipOrHostnameOrURL is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.