-
-
Notifications
You must be signed in to change notification settings - Fork 547
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
Make cmark safe by default #273
Comments
Isn't this a duplicate of #239? |
@fingolfin Yep looks like it, didn’t find that one when I posted this. However I do think we should reconsider allowing a safe subset of html per default since evidently a lot of consumers will just rely on the default behaviour unknowingly exposing themselves (and their users) for unnecessary risk. From my point of view it’s almost always better to be explicit about unsafe behaviour then the opposite. |
This is the reference implementation for commonmark. |
Closing as duplicate, but still considering this. |
Removes CMARK_OPT_SAFE from options. Adds CMARK_OPT_UNSAFE, with the opposite meaning. The new default behavior is to suppress raw HTML and potentially dangerous links. The CMARK_OPT_UNSAFE option has to be set explicitly to prevent this. -------------------------------------------------------- NOTE: This change will require modifications in bindings for cmark and in most libraries and programs that use cmark. -------------------------------------------------------- Closes #239, #273. Borrows heavily from @kivikakk's patch in github#123.
Removes CMARK_OPT_SAFE from options. Adds CMARK_OPT_UNSAFE, with the opposite meaning. The new default behavior is to suppress raw HTML and potentially dangerous links. The CMARK_OPT_UNSAFE option has to be set explicitly to prevent this. -------------------------------------------------------- NOTE: This change will require modifications in bindings for cmark and in most libraries and programs that use cmark. -------------------------------------------------------- Closes #239, #273. Borrows heavily from @kivikakk's patch in #123.
Normalize nomenclature: marker row vs. delimiter row
@kivikakk have changed the default behaviour in cmark-gfm to be safe by default.
github#123
This is the result of a library I created earlier this week as a response to the large number of XSS-exploits found in the wild the past year or so. Hence I wanted to provide a safe by default library wrapping cmark-gfm.
https://github.com/Hultner/safemd
Getting this changed upstream in cmark-gfm was a much greater success than I ever expected from my project and the natural next steps would be to lift it all the way up to cmark.
My suggestion is that we implement similar changes into cmark so you have to be explicitly unsafe instead of implicit unsafe.
I am a strong believer safe by default and hope you'll consider my concerns.
The text was updated successfully, but these errors were encountered: