by sgjohnson · 4y ago · 0 comments
if (db->query("SELECT * FROM `users` WHERE `email` = 'yesthisisdog@gmail.com' AND `password` = MD5('hunter2')") {
login(username);
} else { error('invalid username or password');
}with nobody giving it a second thought.
But on a serious note, it's possible to individually salt passwords, and still match username & password in one query.
That’s cool HN censors passwords like this