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:
2026-01-24 14:39:53 +01:00
committed by GitHub
5 changed files with 92 additions and 27 deletions

View File

@@ -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