[DEV-270] Increase token size in file names

This commit is contained in:
Maxi Redigonda 2022-03-15 09:44:57 -03:00
parent 545f88236d
commit 2e3beb576a
2 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ class FileUploader extends FileManager {
if($this->permission) $result = $this->permission . '_';
else $result = '';
$result .= substr(Hashing::generateRandomToken(), 0, 6) . '_' . $newName;
$result .= Hashing::generateRandomToken() . '_' . $newName;
return $result;
}

View File

@ -9,7 +9,7 @@ class Hashing {
}
public static function generateRandomToken() {
return md5(uniqid(rand()));
return bin2hex(random_bytes(20));
}
public static function generateRandomNumber($min, $max) {