From b803ba4c55f2095ecef1cbc3c784fe178c76e6df Mon Sep 17 00:00:00 2001 From: johnnyq Date: Mon, 17 Mar 2025 15:10:39 -0400 Subject: [PATCH] Use MD5 hashing instead of SHA256 on file uploads which is way faster and still provides a unique file reference --- functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.php b/functions.php index c3566060..3c63d30a 100644 --- a/functions.php +++ b/functions.php @@ -751,7 +751,7 @@ function checkFileUpload($file, $allowed_extensions) $fileContent = file_get_contents($tmp); // Hash the file content using SHA-256 - $hashedContent = hash('sha256', $fileContent); + $hashedContent = hash('md5', $fileContent); // Generate a secure filename using the hashed content $secureFilename = $hashedContent . randomString(2) . '.' . $extension;