3 ms·
Personally i think the unicode code point in identifiers/source code drama is silly. The attack is someone you don't trust modifies your source code, using uni
by bawolff 4y ago
Personally i think the unicode code point in identifiers/source code drama is silly.
The attack is someone you don't trust modifies your source code, using unicode to make the modifications more subtle. What type of threat model is that? There's tons of ways for a malicious party to sabotage source code. Most are probably more subtle than unicode hacks. It is like complaining about how the person you gave a key to your house to might rob you.
I do think that in a code editor already doing syntax highlighting, individual tokens should be bidi isolated so you can't have RLO and friends affecting too much, but beyond that i really think this whole issue is way overhyped.
- josephcsible 4y ago> There's tons of ways for a malicious party to sabotage source code. If the malicious party has unfettered write access to your source code, then sure. But if all changes get reviewed by a maintainer before being merged, then there's way fewer ways, and Unicode attacks are a really large portion of them.
- TacticalCoder 4y ago> There's tons of ways for a malicious party to sabotage source code. Most are probably more subtle than unicode hacks. It is like complaining about how the person you gave a key to your house to might rob you. That's not at all how the open-source world works. Many unknown (to the project maintainer) people can create pull requests and try to sneak in a backdoor through, say, an homograph attack. if ( id == "root" && some_other_condition ) Pull requests comes in: if ( id == "rοοt" && some_other_condition && some_even_better_condition ) I totally vet that! Beautiful added security measure, that "some_even_better_condition" is the nuts, nothing can go wrong: it's an added protection! I merge that ASAP and release! Except your diff tool missed that on that same line "root" was changed to "rοοt" (and the attacker created an account named "rοοt" on your website). Game over. The point is not to bitch about my pseudo-code or how account creation do work: the point is that it's easy to miss an homograph attack during a review.
- deleted 4y ago[deleted]
- jamesdwilson 4y agoNot to be too pedantic but this kind of comparison is poor form in the first place. It would sidestep the entire issue if the code properly checked ACL's, role, or userId.
- squaresmile 4y ago> Except your diff tool missed that on that same line "root" was changed to "rοοt" I feel like many diff tools highlight character changes besides line changes. This is especially helpful when someone makes changes to a long line.