Skip to content

Commit 076a2e6

Browse files
committed
fix setting the presenceLevel
1 parent 2e0f932 commit 076a2e6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/Controller/AuthProcess.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public function main(Request $request): Response
155155
* the lower security level. (level upgrades are of course OK.)
156156
*/
157157
if ($oneToken[5] > $authObject->getPresenceLevel()) {
158-
throw new Exception("Token was initially registered with higher identification guarantees than now authenticated with!");
158+
throw new Exception("Token was initially registered with higher identification guarantees than now authenticated with (was: ".$oneToken[5]." now ".$authObject->getPresenceLevel()."!");
159159
}
160160

161161
/**

src/WebAuthn/WebAuthnAbstractEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ public function __construct(
149149
$this->challenge = $challenge;
150150
$this->idpEntityId = $idpEntityId;
151151
$this->debugMode = $debugMode;
152+
$this->presenceLevel = self::PRESENCE_LEVEL_NONE;
152153
$this->debugBuffer .= "PublicKeyCredential.type: $pubkeyCredType<br/>";
153154
/**
154155
* This is not a required validation as per spec. Still odd that Firefox returns
@@ -172,7 +173,6 @@ public function __construct(
172173
*/
173174
$this->clientDataHash = $this->verifyClientDataJSON($clientDataJSON);
174175
$this->counter = $this->validateAuthData($authData);
175-
$this->presenceLevel = self::PRESENCE_LEVEL_NONE;
176176
}
177177

178178
/**

0 commit comments

Comments
 (0)