aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp/ucp_remind.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2010-05-17 09:40:32 +0200
committerAndreas Fischer <bantu@phpbb.com>2010-05-17 09:44:48 +0200
commitc2b29c317f2d3bf41ed737c9eb3d49bce41ec432 (patch)
treea8c43d327787c7cd3e3480c08ee4bfe0b8f9712b /phpBB/includes/ucp/ucp_remind.php
parentaf21e38c1d6f3fd738c97bd6cf0f96285c0b35aa (diff)
downloadforums-c2b29c317f2d3bf41ed737c9eb3d49bce41ec432.tar
forums-c2b29c317f2d3bf41ed737c9eb3d49bce41ec432.tar.gz
forums-c2b29c317f2d3bf41ed737c9eb3d49bce41ec432.tar.bz2
forums-c2b29c317f2d3bf41ed737c9eb3d49bce41ec432.tar.xz
forums-c2b29c317f2d3bf41ed737c9eb3d49bce41ec432.zip
[ticket/9612] Introduce new function gen_rand_string_friendly().
Introduce new function gen_rand_string_friendly() for user friendly random strings like passwords and captcha codes. Strings generated by gen_rand_string_friendly() will not contain the characters 0 and O. By adding a new function we can increase the entropy of strings generated by gen_rand_string() by putting 0 and O back in. PHPBB3-9612
Diffstat (limited to 'phpBB/includes/ucp/ucp_remind.php')
-rw-r--r--phpBB/includes/ucp/ucp_remind.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/includes/ucp/ucp_remind.php b/phpBB/includes/ucp/ucp_remind.php
index 0042cd9df7..cb89ad99be 100644
--- a/phpBB/includes/ucp/ucp_remind.php
+++ b/phpBB/includes/ucp/ucp_remind.php
@@ -79,7 +79,7 @@ class ucp_remind
// Make password at least 8 characters long, make it longer if admin wants to.
// gen_rand_string() however has a limit of 12 or 13.
- $user_password = gen_rand_string(max(8, rand((int) $config['min_pass_chars'], (int) $config['max_pass_chars'])));
+ $user_password = gen_rand_string_friendly(max(8, mt_rand((int) $config['min_pass_chars'], (int) $config['max_pass_chars'])));
// For the activation key a random length between 6 and 10 will do.
$user_actkey = gen_rand_string(mt_rand(6, 10));