mozilla / eslint-plugin-no-unsanitized

Custom ESLint rule to disallows unsafe innerHTML, outerHTML, insertAdjacentHTML and alike
Mozilla Public License 2.0
223 stars 34 forks source link

Consider allow list for assignment operators #42

Closed jonathanKingston closed 7 years ago

jonathanKingston commented 7 years ago

Can we consider making the expression operators use an allow list of permitted expressions rather than a block list of checked operators. Such that we would have allowedExpressions = ["-=", "*=", "=", "/="]; or similar? So if fancy new operator comes along that adds an exploit we don't need to remember to fix out code in future etc.