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

Security: Remove use of innerHTML, disallow with linter #2706

Merged
merged 4 commits into from
Nov 7, 2019

Conversation

kevinrobinson
Copy link
Contributor

@kevinrobinson kevinrobinson commented Nov 7, 2019

Remove dangerouslySetInnerHTML in the one place it was used as a shortcut for pasting in SVG without translating to React, and in the other place where it was used for HTML (work board), remove that altogether since it's not used anymore. Also remove use in tests where it was harmless, so we can add https://github.com/mozilla/eslint-plugin-no-unsanitized to the lint setup and fail the build on any use of innerHTML. It's only used in one JS test with a bit of a different setup since it loads a fixture of server-rendered HTML.

@kevinrobinson kevinrobinson merged commit 2c64712 into master Nov 7, 2019
@kevinrobinson kevinrobinson deleted the patch/remove-work-board-and-all-innerhtml branch November 7, 2019 19:10
@kevinrobinson kevinrobinson changed the title Maintenance: Remove use of innerHTML Security: Remove use of innerHTML Nov 7, 2019
@kevinrobinson kevinrobinson changed the title Security: Remove use of innerHTML Security: Remove use of innerHTML, disallow with linter Nov 7, 2019
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