Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Failing to prevent the injection of JavaScript into data flows opens the possibility of cross site scripting (XSS). It is beyond the scope of the connector to prevent this however users are alerted to the dangers of embedded JavaScript and requested to use recognised tools like the Microsoft Anti-Cross Site Scripting Library.

Using the Microsoft Anti-Cross Site Scripting Library it is simple to ensure Salesforce or Sitecore bound data does not contain malicious characters.

 

//encode for usage in HTML
string safeString = AntiXss.HtmlEncode("evil string containing evil characters");
 
//encode for usage in HTML attribute
string safeString = AntiXss.HtmlAttributeEncode("evil string containing evil characters");
 
//encode for usage in Javascript
string safeString = AntiXss.JavaScriptEncode("evil string containing evil characters");
 
//HTML Sanitization method to strip dangerous HTML scripts
string safeString = AntiXss.GetSafeHtml("evil string containing evil characters");
  • No labels