3 ms·
It is sometimes possible to work around "quirks", particularly when no malice is intended. When it is a question of security, and fending off attackers, the mos
by ncmncm 5y ago
It is sometimes possible to work around "quirks", particularly when no malice is intended. When it is a question of security, and fending off attackers, the most obvious fix is rarely any kind of fix at all. Attackers can see what you did, and simply step around it.
Bragging about how you put in your broken fix and somebody else didn't tends to attract what may be unwelcome attention.
- tialaramex 5y ago> Bragging about how you put in your broken fix and somebody else didn't tends to attract what may be unwelcome attention. The specific thing being fixed here was a TOCTOU race and thus the fix is just to hold on to the thing being checked so you can use the same thing and eliminate the race. Well, of course I say "just" but it was a lot of work.
- littlestymaar 5y agoYou obviously have no idea what you're talking about. There is no attacker involved in this discussion: the entire purpose of Rust is to prevent the user to use a dangerous method without opting into unsafe. If The user opt into unsafe, there maybe a way for an attacker to exploit a user's mistake, but as long as the user doesn't they'll be safe, because what Rust does is forbidding the user to shoot themselves in the foot.