From e2d26bad35bbe3876862b482f7963d713238313b Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Wed, 8 Sep 2021 19:55:33 +0200 Subject: Fix sanitizing of non-HTML XMLDocument's --- common/misc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common') diff --git a/common/misc.js b/common/misc.js index 91d60d2..6adaf1e 100644 --- a/common/misc.js +++ b/common/misc.js @@ -36,9 +36,9 @@ function Uint8toHex(data) return returnValue; } -function gen_nonce(length) // Default 16 +function gen_nonce(length=16) { - let randomData = new Uint8Array(length || 16); + let randomData = new Uint8Array(length); crypto.getRandomValues(randomData); return Uint8toHex(randomData); } -- cgit v1.2.3