From 248980715809b738946cdda6e6ad087f628576e5 Mon Sep 17 00:00:00 2001 From: CaffeineFueled Date: Mon, 2 Mar 2026 21:39:03 +0100 Subject: [PATCH] CHANGE generated password change to nnnn pin to allow easier communication for temporary work #15 --- app.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index 9ff10f2..19300f0 100644 --- a/app.py +++ b/app.py @@ -262,10 +262,9 @@ function setPassword() { } function genPassword() { - const chars = "ABCDEFGHJKLMNPQRSTUVWXYZabcdefghjkmnpqrstuvwxyz23456789"; - const arr = new Uint32Array(10); + const arr = new Uint32Array(1); crypto.getRandomValues(arr); - const pw = Array.from(arr, n => chars[n % chars.length]).join(""); + const pw = String(arr[0] % 10000).padStart(4, "0"); $("#pw-input").value = pw; $("#pw-input").type = "text"; $("#pw-msg").textContent = "Copy this password before setting it.";