mirror of
https://github.com/Horizontal42/summarum.git
synced 2026-11-10 19:11:58 +03:00
Fix weak PRNG in uid() by using crypto.randomUUID()
Co-authored-by: Horizontal42 <75383519+Horizontal42@users.noreply.github.com>
This commit is contained in:
parent
37cfd2144b
commit
cdb0a4f99f
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue