Skip to content

Commit

Permalink
misc
Browse files Browse the repository at this point in the history
  • Loading branch information
ECHibiki committed Jan 4, 2019
1 parent 38f12ae commit 6dbe4db
Show file tree
Hide file tree
Showing 8 changed files with 676 additions and 165 deletions.
3 changes: 3 additions & 0 deletions inc/mod/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ function generate_salt() {
function login($username, $password) {
global $mod, $config;

echo "$username $password";

$query = prepare("SELECT `id`, `type`, `boards`, `password`, `version` FROM ``mods`` WHERE BINARY `username` = :username");
$query->bindValue(':username', $username);
$query->execute() or error(db_error($query));
Expand All @@ -90,6 +92,7 @@ function login($username, $password) {
list($version, $ok) = test_password($user['password'], $user['version'], $password);

if ($ok) {
echo "was OK";
if ($config['password_crypt_version'] > $version) {
// It's time to upgrade the password hashing method!
list ($user['version'], $user['password']) = crypt_password($password);
Expand Down
Loading

0 comments on commit 6dbe4db

Please sign in to comment.