C# Class mojoPortal.Web.Framework.SecurityHelper

ファイルを表示 Open project: joeaudette/mojoportal

Public Methods

Method Description
DisableBrowserCache ( ) : void
DisableDownloadCache ( ) : void
GetCurrentTrustLevel ( ) : AspNetHostingPermissionLevel

Gets the current Trust Level

GetEmailRegexExpression ( ) : string

it is better to use this method than to directly use the constant above becuase this allows you to override the experession if needed to solve a problem

GetMaxLengthRegexValidationExpression ( int length ) : string
GetRandomASPNET20machinekey ( ) : string
GetRandomKey ( int bytelength ) : string
GetRegexValidationForAllowedExtensions ( string pipeSeparatedExtensions ) : string
GetRegexValidationForAllowedExtensionsJqueryFileUploader ( string pipeSeparatedExtensions ) : string
IsValidEmailAddress ( string email ) : bool
PreventCrossSiteScripting ( String html ) : string
PreventCrossSiteScripting ( String html, String errorHeader ) : string
PreventCrossSiteScripting ( String html, String errorHeader, bool removeMarkupOnFailure ) : string
RemoveAngleBrackets ( string text ) : string
RemoveMarkup ( string text ) : string
SanitizeHtml ( String html ) : string

Private Methods

Method Description
GetXssFilter ( ) : XssFilter

Method Details

DisableBrowserCache() public static method

public static DisableBrowserCache ( ) : void
return void

DisableDownloadCache() public static method

public static DisableDownloadCache ( ) : void
return void

GetCurrentTrustLevel() public static method

Gets the current Trust Level
public static GetCurrentTrustLevel ( ) : AspNetHostingPermissionLevel
return AspNetHostingPermissionLevel

GetEmailRegexExpression() public static method

it is better to use this method than to directly use the constant above becuase this allows you to override the experession if needed to solve a problem
public static GetEmailRegexExpression ( ) : string
return string

GetMaxLengthRegexValidationExpression() public static method

public static GetMaxLengthRegexValidationExpression ( int length ) : string
length int
return string

GetRandomASPNET20machinekey() public static method

public static GetRandomASPNET20machinekey ( ) : string
return string

GetRandomKey() public static method

public static GetRandomKey ( int bytelength ) : string
bytelength int
return string

GetRegexValidationForAllowedExtensions() public static method

public static GetRegexValidationForAllowedExtensions ( string pipeSeparatedExtensions ) : string
pipeSeparatedExtensions string
return string

GetRegexValidationForAllowedExtensionsJqueryFileUploader() public static method

public static GetRegexValidationForAllowedExtensionsJqueryFileUploader ( string pipeSeparatedExtensions ) : string
pipeSeparatedExtensions string
return string

IsValidEmailAddress() public static method

public static IsValidEmailAddress ( string email ) : bool
email string
return bool

PreventCrossSiteScripting() public static method

public static PreventCrossSiteScripting ( String html ) : string
html String
return string

PreventCrossSiteScripting() public static method

public static PreventCrossSiteScripting ( String html, String errorHeader ) : string
html String
errorHeader String
return string

PreventCrossSiteScripting() public static method

public static PreventCrossSiteScripting ( String html, String errorHeader, bool removeMarkupOnFailure ) : string
html String
errorHeader String
removeMarkupOnFailure bool
return string

RemoveAngleBrackets() public static method

public static RemoveAngleBrackets ( string text ) : string
text string
return string

RemoveMarkup() public static method

public static RemoveMarkup ( string text ) : string
text string
return string

SanitizeHtml() public static method

public static SanitizeHtml ( String html ) : string
html String
return string