Harden controllers and password randomness

Co-authored-by: LeOSW42 <673670+LeOSW42@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]andLeOSW42 committed 2026-01-24 13:18:35 +00:00
1 parent fd29d07911
commit 0ef2679808
5 files changed
+87 -28

No files matched your search

+1 -1
View File
@@ -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