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

XSS is easy to introduce #5

Open
sholsapp opened this issue Aug 4, 2021 · 0 comments
Open

XSS is easy to introduce #5

sholsapp opened this issue Aug 4, 2021 · 0 comments

Comments

@sholsapp
Copy link

sholsapp commented Aug 4, 2021

When using the {{emoji-parse ...}} helper, I've realized it's very easy to introduce XSS vulnerability, as the helper uses htmlSafe right here, which causes Handlebars to wholesale not escape the output.

Any ideas to make this better? Is there any reason not to call Handlebars.escapeExpression on the provided input? Or maybe provide an option that we can pass to the helper?

If there isn't a good general solution, maybe just mentioning the use of htmlSafe in the documentation would suffice.

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

1 participant