Updated token generation to 16 bytes (32 hex characters)

This commit is contained in:
Ryan
2025-03-21 14:05:44 -04:00
committed by GitHub
parent a24321455a
commit 559df3c396

View File

@@ -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);