From af43df15ca6f2f44b037e8a8fba23e4768ddd6b2 Mon Sep 17 00:00:00 2001 From: Johann150 Date: Thu, 15 Dec 2022 20:46:17 +0100 Subject: [PATCH] reduce duplication in secureRndstr --- packages/backend/src/misc/secure-rndstr.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/misc/secure-rndstr.ts b/packages/backend/src/misc/secure-rndstr.ts index 1da3c53ef..963e3c00c 100644 --- a/packages/backend/src/misc/secure-rndstr.ts +++ b/packages/backend/src/misc/secure-rndstr.ts @@ -1,7 +1,7 @@ import * as crypto from 'node:crypto'; const L_CHARS = '0123456789abcdefghijklmnopqrstuvwxyz'; -const LU_CHARS = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; +const LU_CHARS = L_CHARS + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; export function secureRndstrCustom(length = 32, chars: string): string { const chars_len = chars.length;