File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -613,6 +613,20 @@ async function validatePublicKey() {
613
613
return true ;
614
614
}
615
615
616
+ function validateExtensions ( ) {
617
+ const extensions = this . authnrData . get ( "webAuthnExtensions" ) ;
618
+
619
+ if ( extensions === undefined ||
620
+ Array . isArray ( extensions ) &&
621
+ extensions . every ( item => typeof item === "object" )
622
+ ) {
623
+ this . audit . journal . add ( "webAuthnExtensions" ) ;
624
+ return true ;
625
+ }
626
+
627
+ throw new Error ( "unable to validate webAuthnExtensions" ) ;
628
+ }
629
+
616
630
async function validateUserHandle ( ) {
617
631
let userHandle = this . authnrData . get ( "userHandle" ) ;
618
632
@@ -706,6 +720,7 @@ function attach(o) {
706
720
validateAaguid,
707
721
validateCredId,
708
722
validatePublicKey,
723
+ validateExtensions,
709
724
validateFlags,
710
725
validateUserHandle,
711
726
validateCounter,
You can’t perform that action at this time.
0 commit comments