Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed authenticatorData flag checking to properly check flag #11

Merged
merged 1 commit into from
May 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/webauthn.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ function authenticate($info, $userwebauthn){
/* experience shows that at least one device (OnePlus 6T/Pie (Android phone)) doesn't set this,
so this test would fail. This is not correct according to the spec, so pragmatically it may
have to be removed */
if ($ao->flags != 0x1) { $this->oops('cannot decode key response (2c)'); } /* only TUP must be set */
if (($ao->flags & 0x1) != 0x1) { $this->oops('cannot decode key response (2c)'); } /* only TUP must be set */

/* assemble signed data */
$clientdata = self::array_to_string($info->response->clientDataJSONarray);
Expand Down Expand Up @@ -372,4 +372,4 @@ private function oops($s, $c=0){
throw new \Exception($s, $c);
}

}
}