mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-05 23:25:30 +02:00
[ticket/9780] Add length check back to gen_rand_string().
PHPBB3-9780
This commit is contained in:
parent
0ee49ca432
commit
d533121741
@ -201,7 +201,7 @@ function set_config_count($config_name, $increment, $is_dynamic = false)
|
||||
function gen_rand_string($num_chars = 8)
|
||||
{
|
||||
// [a, z] + [0, 9] = 36
|
||||
return strtoupper(base_convert(unique_id(), 16, 36));
|
||||
return substr(strtoupper(base_convert(unique_id(), 16, 36)), 0, $num_chars);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user