News for hackers. Stuff that matters.
Re:The Invisible JavaScript Backdoor by robertrbairdii on Wednesday November 10, 2021 @06:33AM (#29173552)
There's definitely a benefit to using a linter and a tool such as prettier. Using prettier pushes the hidden character onto an additional line in the checkCommands array which makes it much easier to spot that something is wrong even if you're not using the trailingCommas setting.

https://imgur.com/a/gYKylyH

I think this eslint rule would also be able to defend against the initial destructuring of the query object by defining a regex that identifiers have to match which would exclude those invisible characters https://eslint.org/docs/rules/id-match

Re:The Invisible JavaScript Backdoor by Andys on Wednesday November 10, 2021 @07:18PM (#29182819)
Indeed, this wouldn't even compile in Go.