-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
quill is not safe #2
Comments
sijad, Thank you for your interest in this. Please, correct me if I am wrong. I think when you insert specially constructed html into quill that affects only your own view before the post is saved. After post it is saved and shown again (and this is when other users can see it) only limited list of html tags/attributes should be allowed to pass through the flarum's s9e text formatter machinery. |
s9e text only affects on output, in
a proper fix would be use HTML parser like htmlpurifier to cleanup user input before it goes through s9e. but it is possible to introduce other problems for example user might see different content when he try to edit his posts or even lost some of his contents due htmlpurifier. |
User himself enters html. He can enter the same html into notepad, save it as myfile.html and open it in browser. Does it make notepad unsafe?
There is no way. When somebody else opens the post, offending html will be sanitized. There is html filtering on server side. I understand your point, but I think implementing html filtering on client side as well is kind of excessive. |
it's not a self xss, as I said this can be triggered by admins when they try to edit attacker post.
you can login as an admin and try to edit this post: http://flarum.courierhost.com/d/16-xxs-again |
I am logged in as admin now. When I am looking at the source of this post <div class="Post-body">
<svg onload=alert(document.location)>
</div> I see that svg tag is sanitized. When I open post for editing, I don't see any content. I assume it was filtered out. |
didn't you see an alert when you click on edit link? |
Nope |
I just want to make sure we're in same page, as I said before quill is not safe (unlike TinyMCE and CKEditor). I just wanted to warn you, as this impact all Flarum users. |
see slab/quill#981 for more info.
for reproducing xss go to http://flarum.courierhost.com/d/15-xss and edit the last post.
https://youtu.be/w1uPaI0Vvds
The text was updated successfully, but these errors were encountered: