Use MD5 hashing instead of SHA256 on file uploads which is way faster and still provides a unique file reference

This commit is contained in:
johnnyq 2025-03-17 15:10:39 -04:00
parent 4378fc2719
commit b803ba4c55
1 changed files with 1 additions and 1 deletions

View File

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