Skip to content

Commit 7f18d22

Browse files
JamesCullumgithub-actions[bot]
authored andcommitted
[skip_ci] v3.3.3: Build artifacts for Deno
1 parent 4ab5b91 commit 7f18d22

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

dist/main.cjs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,13 +1277,11 @@ function coseAlgToHashStr(alg) {
12771277
let webcrypto;
12781278
if ((typeof self !== "undefined") && "crypto" in self) {
12791279
// Always use crypto if available natively (browser / Deno)
1280-
console.warn("[FIDO2-LIB] Native crypto is enabled");
12811280
webcrypto = self.crypto;
12821281

12831282
} else {
12841283
// Always use node webcrypto if available ( >= 16.0 )
12851284
if(platformCrypto__namespace && platformCrypto__namespace.webcrypto) {
1286-
console.warn("[FIDO2-LIB] Native crypto is enabled");
12871285
webcrypto = platformCrypto__namespace.webcrypto;
12881286

12891287
} else {
@@ -2064,7 +2062,7 @@ function validateAssertionResponse() {
20642062

20652063
if (typeof req.response.userHandle !== "string" &&
20662064
!(req.response.userHandle instanceof ArrayBuffer) &&
2067-
req.response.userHandle !== undefined) {
2065+
req.response.userHandle !== undefined && req.response.userHandle !== null) {
20682066
throw new TypeError("expected 'response.userHandle' to be base64 String, ArrayBuffer, or undefined");
20692067
}
20702068

@@ -2961,7 +2959,7 @@ async function parseAuthnrAssertionResponse(msg) {
29612959
}
29622960

29632961
let userHandle;
2964-
if (msg.response.userHandle !== undefined) {
2962+
if (msg.response.userHandle !== undefined && msg.response.userHandle !== null) {
29652963
userHandle = coerceToArrayBuffer$1(msg.response.userHandle, "response.userHandle");
29662964
if (userHandle.byteLength === 0) {
29672965
userHandle = undefined;

dist/main.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40519,11 +40519,9 @@ function b64ToJsObject(b64, desc) {
4051940519
return JSON.parse(ab2str(coerceToArrayBuffer(b64, desc)));
4052040520
}
4052140521
if (typeof self !== "undefined" && "crypto" in self) {
40522-
console.warn("[FIDO2-LIB] Native crypto is enabled");
4052340522
webcrypto = self.crypto;
4052440523
} else {
4052540524
if (mod1 && mod1.webcrypto) {
40526-
console.warn("[FIDO2-LIB] Native crypto is enabled");
4052740525
webcrypto = mod1.webcrypto;
4052840526
} else {
4052940527
webcrypto = new Crypto();
@@ -43504,7 +43502,7 @@ async function parseAuthnrAssertionResponse(msg) {
4350443502
throw new TypeError("expected response to be Object");
4350543503
}
4350643504
let userHandle;
43507-
if (msg.response.userHandle !== undefined) {
43505+
if (msg.response.userHandle !== undefined && msg.response.userHandle !== null) {
4350843506
userHandle = coerceToArrayBuffer(msg.response.userHandle, "response.userHandle");
4350943507
if (userHandle.byteLength === 0) {
4351043508
userHandle = undefined;
@@ -43672,7 +43670,7 @@ function validateAssertionResponse() {
4367243670
if (typeof req.response.signature !== "string" && !(req.response.signature instanceof ArrayBuffer)) {
4367343671
throw new TypeError("expected 'response.signature' to be base64 String or ArrayBuffer");
4367443672
}
43675-
if (typeof req.response.userHandle !== "string" && !(req.response.userHandle instanceof ArrayBuffer) && req.response.userHandle !== undefined) {
43673+
if (typeof req.response.userHandle !== "string" && !(req.response.userHandle instanceof ArrayBuffer) && req.response.userHandle !== undefined && req.response.userHandle !== null) {
4367643674
throw new TypeError("expected 'response.userHandle' to be base64 String, ArrayBuffer, or undefined");
4367743675
}
4367843676
this.audit.validRequest = true;

0 commit comments

Comments
 (0)