4 ms·
First, Isaac Schlueter isn't advocating against best practices with ASI. He's advocating for an alternate best practice that you disagree with. In that very art
by benatkin 15y ago
First, Isaac Schlueter isn't advocating against best practices with ASI. He's advocating for an alternate best practice that you disagree with. In that very article he suggests an alternate place to put the necessary semicolons.
Second, the CouchDB thing isn't because of a lack of best practices, it's because the wrong best practices were misapplied. And in the end, its use of best practices prevented it from severely hurting CouchDB's reputation.
The best practice is that password data should be stored as a salted hash, so if the database is compromised, the original password can't be retrieved. It's rare that the salted hash is intended to be public information, and that's what the CouchDB people did. What they should have done is realized that since they're deliberately sharing the hashed passwords, the original best practice doesn't apply, and they need to break it down and reexamine it (probably a good idea anyway for a project of its size). And they should have reached the conclusion that SHA1 is much too weak and/or that the salted passwords shouldn't be shared. In the new version, CouchDB 1.2, where an effort to correct the problem was made, the passwords aren't public. But at least, aside from the encryption strength, they got the hashing right, in that they used salts so rainbow tables can't be used. SHA-1 is easy to brute force for simple passwords, but as passwords get longer and contain more than dictionary words, it gets harder to brute force. It's easy to communicate that they screwed up, and easy to communicate that it's no worse than Sony password databases that were compromised, but the truth lies somewhere between the two, and can be seen by carefully considering the details of the case.
- Daniel_Newby 15y ago> The best practice is that password data should be stored as a salted hash, so if the database is compromised, the original password can't be retrieved. The best practice is to use a purpose-built password algorithm like bcrypt. Algorithms like SHA1 and MD5 are designed to run fast; even with salts they can be cracked by massively parallel hardware like a room full of GPUz.
- ehutch79 15y agoyou can't have alternative best practices... the BEST in best practices kind of makes that clear. best practices and most practical practices are not always the same though.