Skip to content

Commit d8d9c0c

Browse files
Hexagongithub-actions[bot]
authored andcommitted
[skip_ci] v3.3.2: Build artifacts for Deno
1 parent 6fe8f54 commit d8d9c0c

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

dist/main.cjs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2457,6 +2457,27 @@ async function validatePublicKey() {
24572457
return true;
24582458
}
24592459

2460+
function validateExtensions() {
2461+
const extensions = this.authnrData.get("webAuthnExtensions");
2462+
const shouldHaveExtensions = this.authnrData.get("flags").has("ED");
2463+
2464+
if (shouldHaveExtensions) {
2465+
if (Array.isArray(extensions) &&
2466+
extensions.every(item => typeof item === "object")
2467+
) {
2468+
this.audit.journal.add("webAuthnExtensions");
2469+
} else {
2470+
throw new Error("webAuthnExtensions aren't valid");
2471+
}
2472+
} else {
2473+
if (extensions !== undefined) {
2474+
throw new Error("unexpected webAuthnExtensions found");
2475+
}
2476+
}
2477+
2478+
return true;
2479+
}
2480+
24602481
async function validateUserHandle() {
24612482
let userHandle = this.authnrData.get("userHandle");
24622483

@@ -2550,6 +2571,7 @@ function attach(o) {
25502571
validateAaguid,
25512572
validateCredId,
25522573
validatePublicKey,
2574+
validateExtensions,
25532575
validateFlags,
25542576
validateUserHandle,
25552577
validateCounter,
@@ -2999,6 +3021,7 @@ class Fido2Result {
29993021
await this.validateRawAuthnrData();
30003022
await this.validateRpIdHash();
30013023
await this.validateFlags();
3024+
await this.validateExtensions();
30023025
}
30033026

30043027
async create(req, exp) {

dist/main.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43550,6 +43550,7 @@ class Fido2Result {
4355043550
await this.validateRawAuthnrData();
4355143551
await this.validateRpIdHash();
4355243552
await this.validateFlags();
43553+
await this.validateExtensions();
4355343554
}
4355443555
async create(req, exp) {
4355543556
if (typeof req !== "object") {
@@ -43938,6 +43939,23 @@ async function validatePublicKey() {
4393843939
this.audit.journal.add("credentialPublicKeyPem");
4393943940
return true;
4394043941
}
43942+
function validateExtensions() {
43943+
const extensions7 = this.authnrData.get("webAuthnExtensions");
43944+
const shouldHaveExtensions = this.authnrData.get("flags").has("ED");
43945+
if (shouldHaveExtensions) {
43946+
if (Array.isArray(extensions7) && extensions7.every((item)=>typeof item === "object"
43947+
)) {
43948+
this.audit.journal.add("webAuthnExtensions");
43949+
} else {
43950+
throw new Error("webAuthnExtensions aren't valid");
43951+
}
43952+
} else {
43953+
if (extensions7 !== undefined) {
43954+
throw new Error("unexpected webAuthnExtensions found");
43955+
}
43956+
}
43957+
return true;
43958+
}
4394143959
async function validateUserHandle() {
4394243960
let userHandle = this.authnrData.get("userHandle");
4394343961
if (userHandle === undefined || userHandle === null || userHandle === "") {
@@ -44010,6 +44028,7 @@ function attach(o105) {
4401044028
validateAaguid,
4401144029
validateCredId,
4401244030
validatePublicKey,
44031+
validateExtensions,
4401344032
validateFlags,
4401444033
validateUserHandle,
4401544034
validateCounter,

0 commit comments

Comments
 (0)