mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Fix the return value of save_salt()
Return true if and only if the SQL query was executed successfully. Logins with an unsalted password no longer fail now. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
0613a637b3
commit
d61b34f255
1 changed files with 1 additions and 1 deletions
|
@ -471,7 +471,7 @@ function save_salt($user_id, $passwd) {
|
||||||
$hash = salted_hash($passwd, $salt);
|
$hash = salted_hash($passwd, $salt);
|
||||||
$q = "UPDATE Users SET Salt = " . $dbh->quote($salt) . ", ";
|
$q = "UPDATE Users SET Salt = " . $dbh->quote($salt) . ", ";
|
||||||
$q.= "Passwd = " . $dbh->quote($hash) . " WHERE ID = " . $user_id;
|
$q.= "Passwd = " . $dbh->quote($hash) . " WHERE ID = " . $user_id;
|
||||||
$result = $dbh->exec($q);
|
return $dbh->exec($q);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue