IXssValidator
Members
Namespace: ASPSecurityKit.Xss
Assembly: ASPSecurityKit.dll
Summary
Provides implementers a way to implement request validation logic to detect cross-site scripting (XSS) injection.
Methods
HasXSSCharacters(s,matchIndex)
Summary
Determines if a string has any potential XSS characters.
Returns
true if some XSS characters were found; otherwise, false.
Parameters
| Name | Type | Description |
|---|---|---|
| s | System.String | The string to analyze for XSS characters. |
| matchIndex | System.Int32 (Out) | The index from where the XSS characters were found. |
Validate(modelValue,modelName)
Summary
Traverses the properties of the given model recursively and validates string properties and array items for XSS.
Parameters
| Name | Type | Description |
|---|---|---|
| modelValue | System.Object | The model value. |
| modelName | System.String | Name of the model. |
Exceptions
| Type | Description |
|---|---|
| ASPSecurityKit.Xss.XssDetectedException | When XSS characters are found. |