migrate to bcrypt for password storage

This commit is contained in:
Shish
2014-05-24 00:28:57 +01:00
parent 36713803e3
commit eb51a9b639
6 changed files with 321 additions and 21 deletions

View File

@ -420,8 +420,7 @@ class DanbooruApi extends Extension {
// Code borrowed from /ext/user
$name = $_REQUEST['login'];
$pass = $_REQUEST['password'];
$hash = md5( strtolower($name) . $pass );
$duser = User::by_name_and_hash($name, $hash);
$duser = User::by_name_and_pass($name, $pass);
if(!is_null($duser)) {
$user = $duser;
} else