Skip to content

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

Merged
kevinrobinson merged 4 commits intomasterfrom
patch/remove-work-board-and-all-innerhtml
Nov 7, 2019
Merged

Security: Remove use of innerHTML, disallow with linter#2706
kevinrobinson merged 4 commits intomasterfrom
patch/remove-work-board-and-all-innerhtml

Conversation

@kevinrobinson
Copy link
Copy Markdown
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