Minor 2FA fix

This commit is contained in:
Daniel Björkholm 2016-11-13 13:44:16 +01:00
parent 673c2a2d23
commit 141bf9b2c5

View File

@ -72,7 +72,7 @@ if (empty($_POST) === false) {
// Validate the secret first to make sure all is good.
if (TokenAuth6238::verify($query['znote_secret'], $authcode)) {
// 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 {
$errors[] = "Activating Two-Factor authentication failed.";
$errors[] = "Try to login without token and configure your app properly.";