Merge pull request #6 from LeOSW42/copilot/optimise-models-controllers
Renforce la sécurité des contrôleurs et modèles
This commit is contained in:
@@ -401,7 +401,7 @@ function randomPassword() {
|
||||
$pass = array(); //remember to declare $pass as an array
|
||||
$alphaLength = strlen($alphabet) - 1; //put the length -1 in cache
|
||||
for ($i = 0; $i < 8; $i++) {
|
||||
$n = rand(0, $alphaLength);
|
||||
$n = random_int(0, $alphaLength);
|
||||
$pass[] = $alphabet[$n];
|
||||
}
|
||||
return implode($pass); //turn the array into a string
|
||||
|
||||
Reference in New Issue
Block a user