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

[docs] revisit sanitizer recommendations #2482

Closed
vhscom opened this issue May 27, 2022 · 3 comments · Fixed by #2484
Closed

[docs] revisit sanitizer recommendations #2482

vhscom opened this issue May 27, 2022 · 3 comments · Fixed by #2484
Labels
category: docs Documentation changes released

Comments

@vhscom
Copy link
Contributor

vhscom commented May 27, 2022

What pain point are you perceiving?.
I took one good look at DOMPurify and it's not meant for a modern stack. Next, Nuxt, SvelteKit. All of them do SSR and DOMPurify will fail hard the moment someone tries to use it server-side leading to SO questions like this one.

Describe the solution you'd like
Given this library has such massive exposure and domain knowledge in the area of XSS parsers I think it would be nice to set devs up for success by updating the docs to make an isomorphic xss lib the recommended default with the obvious security disclaimers.

I just tried out js-xss (npm i xss) and it was easy enough to set-up. It supports SSR and also ships type definitions (DOMPurifier type defs must be installed separately). Could you please add this to the list? It's an 8-year old library so I imagine it's been put to the test to get where its at. Best of all, it's still being improved upon as evidenced by its inclued type definitions.

@UziTech
Copy link
Member

UziTech commented May 27, 2022

If you want to make a PR for the docs changes I would be happy to accept it 😁👍

@UziTech UziTech added the category: docs Documentation changes label May 27, 2022
@vhscom
Copy link
Contributor Author

vhscom commented May 29, 2022

Thanks! I sent a pull. I thought about adding isomorphic-dompurify but decided to keep the warning message terse and instead submitted an issue to DOMPurify in case they decide to enhance it so users can use DOMPurify without the wrapper for SSR.

@github-actions
Copy link

🎉 This issue has been resolved in version 4.0.17 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: docs Documentation changes released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants