4 ms·
> 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 per
by 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.