Skip to content
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

CMARK_OPT_SAFE does not exist anymore #8

Open
HermanMartinus opened this issue Sep 14, 2021 · 2 comments
Open

CMARK_OPT_SAFE does not exist anymore #8

HermanMartinus opened this issue Sep 14, 2021 · 2 comments

Comments

@HermanMartinus
Copy link

It looks like Github's cmarkgfm has changed the option CMARK_OPT_SAFE potentially to the inverse CMARK_OPT_UNSAFE. When running as CMARK_OPT_DEFAULT XSS issues are still prevalent.

On running safemd.render(content) the following error occurs type object 'Options' has no attribute 'CMARK_OPT_SAFE'.

@Hultner
Copy link
Owner

Hultner commented Sep 14, 2021

I should probably have added an update here, but that is true. I spoke with GitHub's maintainer of cmarkgfm and got the change (safe by default) into their upstream project. Then we talked with CommonMark maintainers and eventually we managed to get it changed in all of CommonMark. So all recently updated markdown renderers based on CommonMark or their derivates should nowadays be safe by default and not exhibit any XSS-problems.

My library still adds bleach, for additional security, in case another vulnerability in markdown appears.
But I'm not sure if it's worth to maintain a whole library for that purpose. If it's desired I'll update safemd but I've mainly kept it up for people still dependant on older versions of cmark/cmarkgfm.

@HermanMartinus
Copy link
Author

👍 I'll just use CommonMark (new project and all), just thought you'd like to know :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants