From 559df3c396d67e0a0609c6a26f797d99b6ef0b7c Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 21 Mar 2025 14:05:44 -0400 Subject: [PATCH] Updated token generation to 16 bytes (32 hex characters) --- createShareLink.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/createShareLink.php b/createShareLink.php index d506b75..9ff22da 100644 --- a/createShareLink.php +++ b/createShareLink.php @@ -23,7 +23,7 @@ if ($folder !== 'root' && !preg_match('/^[A-Za-z0-9_\- \/]+$/', $folder)) { // Optionally, you could check if the file exists in the uploads directory here. // Generate a secure token. -$token = bin2hex(random_bytes(4)); // 8 hex characters. +$token = bin2hex(random_bytes(16)); // 32 hex characters. // Calculate expiration (Unix timestamp). $expires = time() + ($expirationMinutes * 60);