summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-08-08 11:32:06 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2014-08-08 11:38:00 +0200
commitd61b34f2557eb38142c879cbe2dea8598873dfb3 (patch)
treee0e698d3b2ff0fee6eeab82def8a95820659bb9b /web
parent0613a637b39420deb0b34c8831aa2c31fa63ee7f (diff)
downloadaurweb-d61b34f2557eb38142c879cbe2dea8598873dfb3.tar.xz
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>
Diffstat (limited to 'web')
-rw-r--r--web/lib/aur.inc.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/lib/aur.inc.php b/web/lib/aur.inc.php
index 82730bb..81cbf69 100644
--- a/web/lib/aur.inc.php
+++ b/web/lib/aur.inc.php
@@ -471,7 +471,7 @@ function save_salt($user_id, $passwd) {
$hash = salted_hash($passwd, $salt);
$q = "UPDATE Users SET Salt = " . $dbh->quote($salt) . ", ";
$q.= "Passwd = " . $dbh->quote($hash) . " WHERE ID = " . $user_id;
- $result = $dbh->exec($q);
+ return $dbh->exec($q);
}
/**