Browse Source

webauthn

pull/80/head
Roland Gruber 3 years ago
parent
commit
9d9c37a44a
  1. 2
      lam/lib/2factor.inc
  2. 4
      lam/lib/webauthn.inc

2
lam/lib/2factor.inc

@ -594,8 +594,6 @@ class WebauthnProvider extends BaseProvider {
$response = base64_decode($_POST['sig_response']);
return $webauthnManager->isValidAuthentication($response, $userDn);
}
logNewMessage(LOG_ERR, 'Webauthn authentication failed');
return false;
}
}

4
lam/lib/webauthn.inc

@ -454,7 +454,7 @@ class PublicKeyCredentialSourceRepositorySQLite implements PublicKeyCredentialSo
$statement->execute(array(':userid' => $publicKeyCredentialUserEntity->getId()));
$results = $statement->fetchAll();
foreach ($results as $result) {
$jsonArray = json_decode($results[0]['credentialSource'], true);
$jsonArray = json_decode($result['credentialSource'], true);
$credentials[] = PublicKeyCredentialSource::createFromArray($jsonArray);
}
}
@ -549,7 +549,7 @@ class PublicKeyCredentialSourceRepositorySQLite implements PublicKeyCredentialSo
protected function tableExists(&$pdo, $tableName) {
try {
$result = $pdo->query("SELECT 1 FROM $tableName LIMIT 1");
return ($result === false) ? false : true;
return ($result !== false);
} catch (\PDOException $e) {
return false;
}

Loading…
Cancel
Save