[DEV-270] Increase token size in file names (#1165)
This commit is contained in:
parent
545f88236d
commit
e0738f1c88
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue