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

Only allow UnsafeHtml values for :dangerouslySetInnerHTML #621

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Deraen
Copy link
Member

@Deraen Deraen commented Jan 31, 2025

See https://github.com/reagent-project/reagent/blob/master/doc/Security.md

This does prevent ONE case where EDN/Transit could be used to create arbitrary HTML elements without going through React.

The convert-props is on a very often called code-path, but I hope one JS property check is not too bad. The Clojure map to JS object conversion is already quite slow.

@Deraen Deraen force-pushed the unsafe-html branch 3 times, most recently from 03c9357 to 7787b70 Compare January 31, 2025 08:25
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

Successfully merging this pull request may close these issues.

1 participant