-
Notifications
You must be signed in to change notification settings - Fork 68
Protect users from gallery.cnf #308
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
Conversation
|
So, @LukasReschke. Is this working for you? |
8ddaa3d to
f8556b1
Compare
|
Rebased |
f8556b1 to
1315619
Compare
|
@karlitschek @DeepDiver1975 Needs to be reviewed today. Feel free to delegate to someone who can. |
|
@LukasReschke @PVince81 @schiesbn can you help to review? |
|
👎 - the sanitize function of marked is not secure enough please use commonmark.js as advised at #295 (comment) Try something like: Note that DOMPurify does just nothing in IE 8 :-) |
|
Or even more secure remove the feature 🙊 🙈 🙉 runs away and hides ;-) |
|
The example you gave is neutralized. The first part is converted to text and the second one is completely removed. In the link you gave, to the list of PRs, there is only one which is relevant, but which is caught by DOMpurify: I'll check commonmark to see if there are no rendering issues. There is also mardown-it, which also cares about security. They've all made good progress recently regarding speed. Looking at DOMPurify's doc, I can confirm that I need to remove Gallery configuration support for IE8-9. Not a big deal. |
|
No. DOMPurify is not a proper solution. The Markdown parser on it's own should be secure as well. It's like relying on an AV to make your PC more secure. It might be nice to have but it is in no way a proper defense in depth.
👍
googles for markdown-it |
|
OK! |
1315619 to
1da9917
Compare
|
Done. No problem with speed with the type of content being displayed. @LukasReschke Let me know if that now meets your requirements. |
b9388ac to
e40f0ec
Compare
e40f0ec to
8c5ea89
Compare
|
Can we use DOMPurity 0.6.7 (or directly 0.7.0) as it fixes a bypass? Ref https://github.com/cure53/DOMPurify/releases/tag/0.6.7 |
|
Of course. Can me merge this and I then update all bower and composer packages? |
|
Yup. Let's do it that way. |
Fixes #295
@LukasReschke