Security: capitalization of mods username is significant

This commit is contained in:
8chan Admin 2014-02-13 01:04:32 +00:00
parent bdff0efeaa
commit 5094e208d5

View File

@ -39,7 +39,7 @@ function login($username, $password, $makehash=true) {
$password = sha1($password);
}
$query = prepare("SELECT `id`, `type`, `boards`, `password`, `salt` FROM ``mods`` WHERE `username` = :username");
$query = prepare("SELECT `id`, `type`, `boards`, `password`, `salt` FROM ``mods`` WHERE BINARY `username` = :username");
$query->bindValue(':username', $username);
$query->execute() or error(db_error($query));