From 9c596691d25184b9a7b42a61a34ea0f937f656a1 Mon Sep 17 00:00:00 2001 From: FreddleSpl0it <75116288+FreddleSpl0it@users.noreply.github.com> Date: Fri, 14 Jan 2022 20:54:45 +0100 Subject: [PATCH] add fido2 platform internal authentication --- data/web/json_api.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/data/web/json_api.php b/data/web/json_api.php index 2b257119..c3f8d9fc 100644 --- a/data/web/json_api.php +++ b/data/web/json_api.php @@ -437,7 +437,7 @@ if (isset($_GET['query'])) { if (isset($_SESSION["mailcow_cc_role"])) { // Exclude existing CredentialIds, if any $excludeCredentialIds = fido2(array("action" => "get_user_cids")); - $createArgs = $WebAuthn->getCreateArgs($_SESSION["mailcow_cc_username"], $_SESSION["mailcow_cc_username"], $_SESSION["mailcow_cc_username"], 30, true, $GLOBALS['FIDO2_UV_FLAG_REGISTER'], $excludeCredentialIds); + $createArgs = $WebAuthn->getCreateArgs($_SESSION["mailcow_cc_username"], $_SESSION["mailcow_cc_username"], $_SESSION["mailcow_cc_username"], 30, true, $GLOBALS['FIDO2_UV_FLAG_REGISTER'], null, $excludeCredentialIds); print(json_encode($createArgs)); $_SESSION['challenge'] = $WebAuthn->getChallenge(); return; @@ -465,8 +465,6 @@ if (isset($_GET['query'])) { // webauthn two factor authentication case "webauthn-tfa-registration": if (isset($_SESSION["mailcow_cc_role"])) { - $excludeCredentialIds = null; - // getCreateArgs($userId, $userName, $userDisplayName, $timeout=20, $requireResidentKey=false, $requireUserVerification=false, $crossPlatformAttachment=null, $excludeCredentialIds=array()) // cross-platform: true, if type internal is not allowed // false, if only internal is allowed