This commit is contained in:
Roman 2023-01-16 22:11:49 +01:00
parent 4cec531a25
commit a7fa180c64
2 changed files with 1 additions and 3 deletions

@ -217,8 +217,6 @@ namespace Core\API\TFA {
return $this->createError("Invalid 2FA-token endpoint"); return $this->createError("Invalid 2FA-token endpoint");
} }
$this->result["time"] = time();
$this->result["time_zone"] = $this->context->getSettings()->getTimeZone();
$code = $this->getParam("code"); $code = $this->getParam("code");
if (!$twoFactorToken->verify($code)) { if (!$twoFactorToken->verify($code)) {
return $this->createError("Code does not match"); return $this->createError("Code does not match");

@ -69,7 +69,7 @@ abstract class TwoFactorToken extends DatabaseEntity {
public function confirm(SQL $sql): bool { public function confirm(SQL $sql): bool {
$this->confirmed = true; $this->confirmed = true;
return $this->save($sql) !== false; return $this->save($sql, ["confirmed"]) !== false;
} }
public function jsonSerialize(?array $propertyNames = null): array { public function jsonSerialize(?array $propertyNames = null): array {