Skip to main content
Participant
November 13, 2008
Question

Methods to prevent XSS

  • November 13, 2008
  • 1 reply
  • 348 views
Does anyone know of any methods to prevent Cross Site Scripting (XSS) in CF applications?
This topic has been closed for replies.

1 reply

Inspiring
November 13, 2008
jperez8770 wrote:
> Does anyone know of any methods to prevent Cross Site Scripting (XSS) in CF applications?

Turn on the "Enable Global Script Protection" XSS setting in the CF
administrator.

Never Trust unverified inputs form any client request, be it get|url,
post|form or cookie to be output without protection in future responses.

Use the urlEncodedFormat(), urlDecode(), htmlCodeFormat(),
htmlEditFormat() and xmlFormat() functions to escape any untrusted
content rendering scripting code as harmless text.