Back to discussionComment by paulddraper[-]paulddraper9 years ago1 reply#I don't see why javascript: is fundamentally different than other XSS vectors[-]iopq9 years ago1 reply#because for other types of injections Yesod WILL actually properly encodeaban9 years ago#This is not true, at least not anymore.Yesod uses xss-sanitize [0], and their sanitize function does indeed prevent "javascript:" attempts. They even have a test case for it [1].Playing around with it in the REPL: Prelude Text.HTML.SanitizeXSS Data.Text> sanitize $ pack "" "" Prelude Text.HTML.SanitizeXSS Data.Text> sanitize $ pack "" "" Prelude Text.HTML.SanitizeXSS Data.Text> sanitize $ pack "" "" Prelude Text.HTML.SanitizeXSS Data.Text> sanitize $ pack "" "" [0]: https://hackage.haskell.org/package/xss-sanitize[1]: https://github.com/yesodweb/haskell-xss-sanitize/blob/9a9101...
paulddraper9 years ago1 reply#I don't see why javascript: is fundamentally different than other XSS vectors
aban9 years ago#This is not true, at least not anymore.Yesod uses xss-sanitize [0], and their sanitize function does indeed prevent "javascript:" attempts. They even have a test case for it [1].Playing around with it in the REPL: Prelude Text.HTML.SanitizeXSS Data.Text> sanitize $ pack "" "" Prelude Text.HTML.SanitizeXSS Data.Text> sanitize $ pack "" "" Prelude Text.HTML.SanitizeXSS Data.Text> sanitize $ pack "" "" Prelude Text.HTML.SanitizeXSS Data.Text> sanitize $ pack "" "" [0]: https://hackage.haskell.org/package/xss-sanitize[1]: https://github.com/yesodweb/haskell-xss-sanitize/blob/9a9101...
Yesod uses xss-sanitize [0], and their sanitize function does indeed prevent "javascript:" attempts. They even have a test case for it [1].
[0]: https://hackage.haskell.org/package/xss-sanitizePlaying around with it in the REPL:
[1]: https://github.com/yesodweb/haskell-xss-sanitize/blob/9a9101...