tfa fix
This commit is contained in:
parent
4cec531a25
commit
a7fa180c64
@ -217,8 +217,6 @@ namespace Core\API\TFA {
|
||||
return $this->createError("Invalid 2FA-token endpoint");
|
||||
}
|
||||
|
||||
$this->result["time"] = time();
|
||||
$this->result["time_zone"] = $this->context->getSettings()->getTimeZone();
|
||||
$code = $this->getParam("code");
|
||||
if (!$twoFactorToken->verify($code)) {
|
||||
return $this->createError("Code does not match");
|
||||
|
@ -69,7 +69,7 @@ abstract class TwoFactorToken extends DatabaseEntity {
|
||||
|
||||
public function confirm(SQL $sql): bool {
|
||||
$this->confirmed = true;
|
||||
return $this->save($sql) !== false;
|
||||
return $this->save($sql, ["confirmed"]) !== false;
|
||||
}
|
||||
|
||||
public function jsonSerialize(?array $propertyNames = null): array {
|
||||
|
Loading…
Reference in New Issue
Block a user