aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/usercp_sendpasswd.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/usercp_sendpasswd.php')
-rw-r--r--phpBB/includes/usercp_sendpasswd.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/phpBB/includes/usercp_sendpasswd.php b/phpBB/includes/usercp_sendpasswd.php
index 2ca37ffb6b..b060f75fcf 100644
--- a/phpBB/includes/usercp_sendpasswd.php
+++ b/phpBB/includes/usercp_sendpasswd.php
@@ -48,6 +48,9 @@ if ( isset($HTTP_POST_VARS['submit']) )
$username = $row['username'];
$user_actkey = gen_rand_string(true);
+ $key_len = 54 - strlen($server_url);
+ $key_len = ( $str_len > 6 ) ? $key_len : 6;
+ $user_actkey = substr($user_actkey, 0, $key_len);
$user_password = gen_rand_string(false);
$sql = "UPDATE " . USERS_TABLE . "
@@ -128,4 +131,4 @@ $template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
-?> \ No newline at end of file
+?>