You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
first of all, thank you very much for this super useful library ❤️🙏
I'm running into an "issue" (I'm unsure whether it's an issue or intended behaviour) that some elements don't get scrubbed if their < and > signs are encoded. For example:
# Works as expectediex(1)>HtmlSanitizeEx.html5("<script>alert('xss');</script>")"alert('xss');"# Doesn't work as expected (the "script" tags aren't removed)iex(2)>HtmlSanitizeEx.html5("<script>alert('xss');</script>")"<script>alert('xss');</script>"
If I render the second string in my html with raw(@safe_content), it becomes <script>alert('xss');</script> again.
Now, I'm unsure about the implications of this. In my case, the string is user input and I render the content as described in my HEEX template because it can contain code snippets. What do you think? Is there a possible vulnerability here or does everything work as intended? :)
The text was updated successfully, but these errors were encountered:
I'm not sure either, but what I can do is simply replace the < and > values with < and > again and then run the sanitizer. That should take care of that problem.
Hello there,
first of all, thank you very much for this super useful library ❤️🙏
I'm running into an "issue" (I'm unsure whether it's an issue or intended behaviour) that some elements don't get scrubbed if their
<
and>
signs are encoded. For example:If I render the second string in my html with
raw(@safe_content)
, it becomes<script>alert('xss');</script>
again.Now, I'm unsure about the implications of this. In my case, the string is user input and I render the content as described in my HEEX template because it can contain code snippets. What do you think? Is there a possible vulnerability here or does everything work as intended? :)
The text was updated successfully, but these errors were encountered: