Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
XSS Protection API 1.0.8
-
None
Description
Since SLING-5445, XSSAPI#encodeForJSString is no longer properly encoding </script> and <!--. We should revert to using OWASP Encode#forJavaScript and handle - characters correctly for JSON too, by replacing them with \u002D
Attachments
Attachments
Issue Links
- breaks
-
SLING-11768 Display Context "scriptString" encodes hyphen (-) as \u002D
- Open
- causes
-
SLING-8879 Make JSONObject#toString and XSSAPI#encodeForJSString both safe and correct for pasting into a javascript string literal
- Open