mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 14:30:32 +02:00
Shorten the activation, key to allow for less than 77 characters..,yet still keep it as long as possible.
git-svn-id: file:///svn/phpbb/trunk@2459 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -395,6 +395,9 @@ if ( isset($HTTP_POST_VARS['submit']) )
|
||||
{
|
||||
$user_active = 0;
|
||||
$user_actkey = gen_rand_string(true);
|
||||
$key_len = 54 - (strlen($server_url));
|
||||
$key_len = ($key_len > 6) ? $key_len : 6;
|
||||
$user_actkey = substr($user_actkey, 0, $key_len);
|
||||
|
||||
if ( $userdata['session_logged_in'] )
|
||||
{
|
||||
@@ -489,6 +492,9 @@ if ( isset($HTTP_POST_VARS['submit']) )
|
||||
if ( $board_config['require_activation'] == USER_ACTIVATION_SELF || $board_config['require_activation'] == USER_ACTIVATION_ADMIN || $coppa )
|
||||
{
|
||||
$user_actkey = gen_rand_string(true);
|
||||
$key_len = 54 - (strlen($server_url));
|
||||
$key_len = ( $key_len > 6 ) ? $key_len : 6;
|
||||
$user_actkey = substr($user_actkey, 0, $key_len);
|
||||
$sql .= "0, '" . str_replace("\'", "''", $user_actkey) . "')";
|
||||
}
|
||||
else
|
||||
@@ -922,4 +928,4 @@ $template->pparse('body');
|
||||
|
||||
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@@ -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);
|
||||
|
||||
?>
|
||||
?>
|
||||
|
Reference in New Issue
Block a user