mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Avoid random token colissions
This commit is contained in:
@@ -57,9 +57,9 @@ function sRandomChars($length = 15,$pattern="23456789abcdefghijkmnpqrstuvwxyz")
|
||||
for($i=0;$i<$length;$i++)
|
||||
{
|
||||
if(isset($key))
|
||||
$key .= $pattern[mt_rand(0,$patternlength)];
|
||||
$key .= $pattern[random_int(0,$patternlength)];
|
||||
else
|
||||
$key = $pattern[mt_rand(0,$patternlength)];
|
||||
$key = $pattern[random_int(0,$patternlength)];
|
||||
}
|
||||
return $key;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user