🐛 Use random UUIDs for share link IDs (#11117)

Share link IDs function as capability secrets — anyone possessing
the ID can read a file without authentication. The previous UUIDv8
scheme is predictable (56 bits fixed per process + 48-bit timestamp).

Changed to uuid/random (UUIDv4) for genuine unpredictability.

Closes #11116

AI-assisted-by: qwen3.7-plus
This commit is contained in:
Andrey Antukh 2026-08-07 11:27:12 +02:00 committed by GitHub
parent 6951876c13
commit 5571c53502
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -43,7 +43,7 @@
[conn {:keys [profile-id file-id pages who-comment who-inspect]}]
(let [pages (db/create-array conn "uuid" pages)
slink (db/insert! conn :share-link
{:id (uuid/next)
{:id (uuid/random)
:file-id file-id
:who-comment who-comment
:who-inspect who-inspect