mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user