Class UrlSanitationOptions
Inheritance
Namespace: Emby.Model.Sanitation
Assembly: MediaBrowser.Model.dll
Syntax
public class UrlSanitationOptions
Properties
DefaultParameterNames
Declaration
public static HashSet<string> DefaultParameterNames { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.HashSet<System.String> |
SanitizeDefaultParams
Gets or sets a value indicating whether to sanitize parameters included in DefaultParameterNames.
Declaration
public bool SanitizeDefaultParams { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
true by default.
Examples
http://user:*****@host.domain.com:8080/pathpart1/pathpart2?param1=abcde+param2=cdefg
SanitizeHost
Gets or sets a value indicating whether to sanitize the host name or address.
Declaration
public bool SanitizeHost { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Examples
http://user:password@*****:8080/pathpart1/pathpart2?param1=abcde+param2=cdefg
SanitizeParams
Gets the sanitize parameter list.
Declaration
public List<string> SanitizeParams { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<System.String> | The sanitize parameter list. |
Remarks
Add parameter names to sanitize. Applies to URL parameters, request headers and response headers.
Examples
http://user:password@host.domain.com:8080/pathpart1/pathpart2?param1=*****+param2=cdefg
SanitizePath
Gets or sets a value indicating whether to sanitize the path parts.
Declaration
public bool SanitizePath { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Examples
http://user:password@host.domain.com:8080/*****/*****?param1=abcde+param2=cdefg
SanitizePort
Gets or sets a value indicating whether to sanitize the port number.
Declaration
public bool SanitizePort { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Examples
http://user:password@host.domain.com:****/pathpart1/pathpart2?param1=abcde+param2=cdefg
SanitizeStrings
Gets the sanitize strings list.
Declaration
public IList<string> SanitizeStrings { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<System.String> | The sanitize strings list. |
Remarks
Add arbitrary strings to sanitize. Applies to URL parameter, request header and response header values.
Examples
http://user:password@host.domain.com:8080/pathpart1/*****?param1=abcde+param2=cdefg
Methods
ShouldSanitizeParam(String, String)
Declaration
public bool ShouldSanitizeParam(string paramName, string value = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | paramName | |
System.String | value |
Returns
Type | Description |
---|---|
System.Boolean |