1
0
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:
Joas Schilling 2010-08-20 09:21:15 -04:00 committed by Andreas Fischer
parent 0ee49ca432
commit d533121741

View File

@ -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);
}
/**