mirror of
https://github.com/itflow-org/itflow
synced 2026-03-26 15:25:38 +00:00
Added Commented code to has the file contents itself instead of the name
This commit is contained in:
@@ -635,7 +635,14 @@ function checkFileUpload($file, $allowed_extensions) {
|
|||||||
return "File size exceeds the limit.";
|
return "File size exceeds the limit.";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Perform additional content-based validation here, if needed
|
// Read the file content
|
||||||
|
//$fileContent = file_get_contents($tmp);
|
||||||
|
|
||||||
|
// Hash the file content using SHA-256
|
||||||
|
//$hashedContent = hash('sha256', $fileContent);
|
||||||
|
|
||||||
|
// Generate a secure filename using the hashed content
|
||||||
|
//$secureFilename = $hashedContent . '.' . $extension;
|
||||||
|
|
||||||
// Generate a secure filename using SHA-256
|
// Generate a secure filename using SHA-256
|
||||||
$secureFilename = hash('sha256', time() . $name) . '.' . $extension;
|
$secureFilename = hash('sha256', time() . $name) . '.' . $extension;
|
||||||
|
|||||||
Reference in New Issue
Block a user