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

feat: Sanitize Markdown Inputs #125

Closed
bliutech opened this issue Sep 22, 2023 · 1 comment
Closed

feat: Sanitize Markdown Inputs #125

bliutech opened this issue Sep 22, 2023 · 1 comment
Labels
wontfix This will not be worked on

Comments

@bliutech
Copy link
Member

Currently, to display the generated Markdown, we are using dangerouslySetInnerHTML which has some complex implications for security. To be truly cautious, it would be nice to use DOMPurify to sanitize all contributed blog posts. isomorphic-dompurify is probably the best library to use due to server side rendering. https://github.com/kkomelin/isomorphic-dompurify There may need to be a bit of wrangling with the Next.js build configuration due to including this library. kkomelin/isomorphic-dompurify#54

@r2dev2
Copy link
Member

r2dev2 commented Jun 19, 2024

We manually approve all markdown before merging. If one of our contributors wanted to be malicious (with 0 important cookies), they could just add a full html page.

@r2dev2 r2dev2 closed this as completed Jun 19, 2024
@r2dev2 r2dev2 added the wontfix This will not be worked on label Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants