Merge pull request #248 from ninjalulz/Fix2FA

Minor 2FA fix
This commit is contained in:
Stefan A. Brannfjell 2016-11-13 14:00:47 +01:00 committed by GitHub
commit 66264947ba

View File

@ -72,7 +72,7 @@ if (empty($_POST) === false) {
// Validate the secret first to make sure all is good. // Validate the secret first to make sure all is good.
if (TokenAuth6238::verify($query['znote_secret'], $authcode)) { if (TokenAuth6238::verify($query['znote_secret'], $authcode)) {
// Success, enable the 2FA system // Success, enable the 2FA system
mysql_update("UPDATE `accounts` SET `secret`= '$authcode' WHERE `id`='$login';"); mysql_update("UPDATE `accounts` SET `secret`= '".$query['znote_secret']."' WHERE `id`='$login';");
} else { } else {
$errors[] = "Activating Two-Factor authentication failed."; $errors[] = "Activating Two-Factor authentication failed.";
$errors[] = "Try to login without token and configure your app properly."; $errors[] = "Try to login without token and configure your app properly.";