Fix weak PRNG in uid() by using crypto.randomUUID()

Co-authored-by: Horizontal42 <75383519+Horizontal42@users.noreply.github.com>
This commit is contained in:
google-labs-jules[bot] 2026-08-26 14:01:21 +00:00
parent 37cfd2144b
commit cdb0a4f99f

View file

@ -64,7 +64,7 @@ let liveRates: Record<string, number> = {};
let lastWindowFocusAt = 0; let lastWindowFocusAt = 0;
function uid(): string { function uid(): string {
return Math.random().toString(36).slice(2, 10); return crypto.randomUUID();
} }
// ---------- documents // ---------- documents