Class UrlValidator
Represents a utility class for validating URLs to ensure they are safe for outbound access.
Inheritance
System.Object
UrlValidator
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: BoldReports.Base.Utils
Assembly: BoldReports.Web.dll
Syntax
public static class UrlValidator
Remarks
Provides validation utilities to evaluate URLs for outbound requests, ensuring they are well-formed, non-local, and permitted based on customizable firewall rules.
Methods
IsValidURL(String, Dictionary<String, FirewallSettings>, String, out String)
Validates whether a given URL is well-formed, non-local, and allowed based on firewall settings.
Declaration
public static bool IsValidURL(string url, Dictionary<string, FirewallSettings> settings, string extName, out string errorMsg)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | url | The URL to validate. |
| System.Collections.Generic.Dictionary<System.String, FirewallSettings> | settings | The firewall settings used to evaluate the outbound URL. |
| System.String | extName | The name of the extension requesting the validation. |
| System.String | errorMsg | Outputs an error message if validation fails. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the URL is valid and permitted; otherwise, false. |