1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-30 10:36:35 +02:00

Server: Changed ID length from 32 to 22 characters

Should still prevent collisions for 60 times the age of the Universe
This commit is contained in:
Laurent Cozic 2021-12-16 11:27:22 +01:00
parent 83a46e563d
commit e9ce3d194c

View File

@ -5,6 +5,6 @@ const generate = require('nanoid/generate');
// > On the other hand, 128 bits (between 21 and 22 characters
// > alphanumeric) is beyond the reach of brute-force attacks pretty much
// > indefinitely
export default function uuidgen(length: number = 32): string {
export default function uuidgen(length: number = 22): string {
return generate('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', length);
}