[DEV-270] Increase token size in file names (#1165)

This commit is contained in:
Maximiliano Redigonda 2022-03-16 09:19:12 -03:00 committed by GitHub
parent 545f88236d
commit e0738f1c88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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) {