Harden controllers and password randomness
Co-authored-by: LeOSW42 <673670+LeOSW42@users.noreply.github.com>
This commit is contained in:
@@ -408,7 +408,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