diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2010-08-20 09:21:15 -0400 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2010-08-20 20:11:36 +0200 |
commit | d53312174169f311714da389b6a36fe6a4bc8f9a (patch) | |
tree | 02365b87dbc7616996840c037073d86f870c9352 | |
parent | 0ee49ca432a4ba334c529e973dd10c85f38452f4 (diff) | |
download | forums-d53312174169f311714da389b6a36fe6a4bc8f9a.tar forums-d53312174169f311714da389b6a36fe6a4bc8f9a.tar.gz forums-d53312174169f311714da389b6a36fe6a4bc8f9a.tar.bz2 forums-d53312174169f311714da389b6a36fe6a4bc8f9a.tar.xz forums-d53312174169f311714da389b6a36fe6a4bc8f9a.zip |
[ticket/9780] Add length check back to gen_rand_string().
PHPBB3-9780
-rw-r--r-- | phpBB/includes/functions.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 980a26d525..36b9e18176 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -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); } /** |