diff -crN phpbb2013/admin/admin_board.php phpbb2019/admin/admin_board.php
*** phpbb2013/admin/admin_board.php Sun Feb 27 20:30:44 2005
--- phpbb2019/admin/admin_board.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_board.php,v 1.51.2.9 2004/11/18 17:49:33 acydburn Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_board.php,v 1.51.2.13 2005/12/29 11:51:11 acydburn Exp $
*
*
***************************************************************************/
***************
*** 16,22 ****
if( !empty($setmodules) )
{
$file = basename(__FILE__);
! $module['General']['Configuration'] = "$file";
return;
}
--- 16,22 ----
if( !empty($setmodules) )
{
$file = basename(__FILE__);
! $module['General']['Configuration'] = $file;
return;
}
***************
*** 100,105 ****
--- 100,108 ----
$confirm_yes = ($new['enable_confirm']) ? 'checked="checked"' : '';
$confirm_no = (!$new['enable_confirm']) ? 'checked="checked"' : '';
+ $allow_autologin_yes = ($new['allow_autologin']) ? 'checked="checked"' : '';
+ $allow_autologin_no = (!$new['allow_autologin']) ? 'checked="checked"' : '';
+
$board_email_form_yes = ( $new['board_email_form'] ) ? "checked=\"checked\"" : "";
$board_email_form_no = ( !$new['board_email_form'] ) ? "checked=\"checked\"" : "";
***************
*** 165,170 ****
--- 168,177 ----
"L_ADMIN" => $lang['Acc_Admin'],
"L_VISUAL_CONFIRM" => $lang['Visual_confirm'],
"L_VISUAL_CONFIRM_EXPLAIN" => $lang['Visual_confirm_explain'],
+ "L_ALLOW_AUTOLOGIN" => $lang['Allow_autologin'],
+ "L_ALLOW_AUTOLOGIN_EXPLAIN" => $lang['Allow_autologin_explain'],
+ "L_AUTOLOGIN_TIME" => $lang['Autologin_time'],
+ "L_AUTOLOGIN_TIME_EXPLAIN" => $lang['Autologin_time_explain'],
"L_COOKIE_SETTINGS" => $lang['Cookie_settings'],
"L_COOKIE_SETTINGS_EXPLAIN" => $lang['Cookie_settings_explain'],
"L_COOKIE_DOMAIN" => $lang['Cookie_domain'],
***************
*** 184,189 ****
--- 191,204 ----
"L_MAX_POLL_OPTIONS" => $lang['Max_poll_options'],
"L_FLOOD_INTERVAL" => $lang['Flood_Interval'],
"L_FLOOD_INTERVAL_EXPLAIN" => $lang['Flood_Interval_explain'],
+
+ 'L_MAX_LOGIN_ATTEMPTS' => $lang['Max_login_attempts'],
+ 'L_MAX_LOGIN_ATTEMPTS_EXPLAIN' => $lang['Max_login_attempts_explain'],
+ 'L_LOGIN_RESET_TIME' => $lang['Login_reset_time'],
+ 'L_LOGIN_RESET_TIME_EXPLAIN' => $lang['Login_reset_time_explain'],
+ 'MAX_LOGIN_ATTEMPTS' => $new['max_login_attempts'],
+ 'LOGIN_RESET_TIME' => $new['login_reset_time'],
+
"L_BOARD_EMAIL_FORM" => $lang['Board_email_form'],
"L_BOARD_EMAIL_FORM_EXPLAIN" => $lang['Board_email_form_explain'],
"L_TOPICS_PER_PAGE" => $lang['Topics_per_page'],
***************
*** 254,260 ****
"ACTIVATION_ADMIN_CHECKED" => $activation_admin,
"CONFIRM_ENABLE" => $confirm_yes,
"CONFIRM_DISABLE" => $confirm_no,
! "ACTIVATION_NONE_CHECKED" => $activation_none,
"BOARD_EMAIL_FORM_ENABLE" => $board_email_form_yes,
"BOARD_EMAIL_FORM_DISABLE" => $board_email_form_no,
"MAX_POLL_OPTIONS" => $new['max_poll_options'],
--- 269,277 ----
"ACTIVATION_ADMIN_CHECKED" => $activation_admin,
"CONFIRM_ENABLE" => $confirm_yes,
"CONFIRM_DISABLE" => $confirm_no,
! 'ALLOW_AUTOLOGIN_YES' => $allow_autologin_yes,
! 'ALLOW_AUTOLOGIN_NO' => $allow_autologin_no,
! 'AUTOLOGIN_TIME' => (int) $new['max_autologin_time'],
"BOARD_EMAIL_FORM_ENABLE" => $board_email_form_yes,
"BOARD_EMAIL_FORM_DISABLE" => $board_email_form_no,
"MAX_POLL_OPTIONS" => $new['max_poll_options'],
diff -crN phpbb2013/admin/admin_db_utilities.php phpbb2019/admin/admin_db_utilities.php
*** phpbb2013/admin/admin_db_utilities.php Sun Feb 27 20:30:44 2005
--- phpbb2019/admin/admin_db_utilities.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_db_utilities.php,v 1.42.2.11 2005/02/21 18:36:49 acydburn Exp $
*
****************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_db_utilities.php,v 1.42.2.12 2005/11/05 21:18:12 grahamje Exp $
*
****************************************************************************/
***************
*** 693,699 ****
include('./page_footer_admin.'.$phpEx);
}
! $tables = array('auth_access', 'banlist', 'categories', 'config', 'disallow', 'forums', 'forum_prune', 'groups', 'posts', 'posts_text', 'privmsgs', 'privmsgs_text', 'ranks', 'search_results', 'search_wordlist', 'search_wordmatch', 'sessions', 'smilies', 'themes', 'themes_name', 'topics', 'topics_watch', 'user_group', 'users', 'vote_desc', 'vote_results', 'vote_voters', 'words', 'confirm');
$additional_tables = (isset($HTTP_POST_VARS['additional_tables'])) ? $HTTP_POST_VARS['additional_tables'] : ( (isset($HTTP_GET_VARS['additional_tables'])) ? $HTTP_GET_VARS['additional_tables'] : "" );
--- 693,699 ----
include('./page_footer_admin.'.$phpEx);
}
! $tables = array('auth_access', 'banlist', 'categories', 'config', 'disallow', 'forums', 'forum_prune', 'groups', 'posts', 'posts_text', 'privmsgs', 'privmsgs_text', 'ranks', 'search_results', 'search_wordlist', 'search_wordmatch', 'sessions', 'smilies', 'themes', 'themes_name', 'topics', 'topics_watch', 'user_group', 'users', 'vote_desc', 'vote_results', 'vote_voters', 'words', 'confirm', 'sessions_keys');
$additional_tables = (isset($HTTP_POST_VARS['additional_tables'])) ? $HTTP_POST_VARS['additional_tables'] : ( (isset($HTTP_GET_VARS['additional_tables'])) ? $HTTP_GET_VARS['additional_tables'] : "" );
diff -crN phpbb2013/admin/admin_disallow.php phpbb2019/admin/admin_disallow.php
*** phpbb2013/admin/admin_disallow.php Sun Feb 27 20:30:44 2005
--- phpbb2019/admin/admin_disallow.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_disallow.php,v 1.9.2.2 2002/11/26 11:42:11 psotfx Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_disallow.php,v 1.9.2.4 2005/12/18 13:57:50 grahamje Exp $
*
*
***************************************************************************/
***************
*** 25,31 ****
if( !empty($setmodules) )
{
$filename = basename(__FILE__);
! $module['Users']['Disallow'] = append_sid($filename);
return;
}
--- 25,31 ----
if( !empty($setmodules) )
{
$filename = basename(__FILE__);
! $module['Users']['Disallow'] = $filename;
return;
}
***************
*** 45,51 ****
if ($disallowed_user == '')
{
! message_die(MESSAGE, $lang['Fields_empty']);
}
if( !validate_username($disallowed_user) )
{
--- 45,51 ----
if ($disallowed_user == '')
{
! message_die(GENERAL_MESSAGE, $lang['Fields_empty']);
}
if( !validate_username($disallowed_user) )
{
diff -crN phpbb2013/admin/admin_forums.php phpbb2019/admin/admin_forums.php
*** phpbb2013/admin/admin_forums.php Sun Feb 27 20:30:44 2005
--- phpbb2019/admin/admin_forums.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_forums.php,v 1.40.2.11 2004/03/25 15:57:19 acydburn Exp $
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_forums.php,v 1.40.2.12 2005/05/07 22:18:10 acydburn Exp $
*
***************************************************************************/
***************
*** 233,238 ****
--- 233,239 ----
if( $mode == "addforum" )
{
list($cat_id) = each($HTTP_POST_VARS['addforum']);
+ $cat_id = intval($cat_id);
//
// stripslashes needs to be run on this because slashes are added when the forum name is posted
//
***************
*** 1024,1027 ****
include('./page_footer_admin.'.$phpEx);
! ?>
--- 1025,1028 ----
include('./page_footer_admin.'.$phpEx);
! ?>
\ No newline at end of file
diff -crN phpbb2013/admin/admin_ranks.php phpbb2019/admin/admin_ranks.php
*** phpbb2013/admin/admin_ranks.php Sun Feb 27 20:30:44 2005
--- phpbb2019/admin/admin_ranks.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_ranks.php,v 1.13.2.4 2004/03/25 15:57:20 acydburn Exp $
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_ranks.php,v 1.13.2.5 2005/12/18 13:57:50 grahamje Exp $
*
***************************************************************************/
***************
*** 24,30 ****
if( !empty($setmodules) )
{
$file = basename(__FILE__);
! $module['Users']['Ranks'] = "$file";
return;
}
--- 24,30 ----
if( !empty($setmodules) )
{
$file = basename(__FILE__);
! $module['Users']['Ranks'] = $file;
return;
}
diff -crN phpbb2013/admin/admin_smilies.php phpbb2019/admin/admin_smilies.php
*** phpbb2013/admin/admin_smilies.php Sun Feb 27 20:30:44 2005
--- phpbb2019/admin/admin_smilies.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_smilies.php,v 1.22.2.13 2004/03/25 15:57:20 acydburn Exp $
*
****************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_smilies.php,v 1.22.2.16 2005/10/30 15:17:13 acydburn Exp $
*
****************************************************************************/
***************
*** 404,416 ****
//
$smile_code = ( isset($HTTP_POST_VARS['smile_code']) ) ? trim($HTTP_POST_VARS['smile_code']) : trim($HTTP_GET_VARS['smile_code']);
$smile_url = ( isset($HTTP_POST_VARS['smile_url']) ) ? trim($HTTP_POST_VARS['smile_url']) : trim($HTTP_GET_VARS['smile_url']);
$smile_emotion = ( isset($HTTP_POST_VARS['smile_emotion']) ) ? trim($HTTP_POST_VARS['smile_emotion']) : trim($HTTP_GET_VARS['smile_emotion']);
$smile_id = ( isset($HTTP_POST_VARS['smile_id']) ) ? intval($HTTP_POST_VARS['smile_id']) : intval($HTTP_GET_VARS['smile_id']);
// If no code was entered complain ...
if ($smile_code == '' || $smile_url == '')
{
! message_die(MESSAGE, $lang['Fields_empty']);
}
//
--- 404,417 ----
//
$smile_code = ( isset($HTTP_POST_VARS['smile_code']) ) ? trim($HTTP_POST_VARS['smile_code']) : trim($HTTP_GET_VARS['smile_code']);
$smile_url = ( isset($HTTP_POST_VARS['smile_url']) ) ? trim($HTTP_POST_VARS['smile_url']) : trim($HTTP_GET_VARS['smile_url']);
+ $smile_url = phpbb_ltrim(basename($smile_url), "'");
$smile_emotion = ( isset($HTTP_POST_VARS['smile_emotion']) ) ? trim($HTTP_POST_VARS['smile_emotion']) : trim($HTTP_GET_VARS['smile_emotion']);
$smile_id = ( isset($HTTP_POST_VARS['smile_id']) ) ? intval($HTTP_POST_VARS['smile_id']) : intval($HTTP_GET_VARS['smile_id']);
// If no code was entered complain ...
if ($smile_code == '' || $smile_url == '')
{
! message_die(GENERAL_MESSAGE, $lang['Fields_empty']);
}
//
***************
*** 446,457 ****
//
$smile_code = ( isset($HTTP_POST_VARS['smile_code']) ) ? $HTTP_POST_VARS['smile_code'] : $HTTP_GET_VARS['smile_code'];
$smile_url = ( isset($HTTP_POST_VARS['smile_url']) ) ? $HTTP_POST_VARS['smile_url'] : $HTTP_GET_VARS['smile_url'];
$smile_emotion = ( isset($HTTP_POST_VARS['smile_emotion']) ) ? $HTTP_POST_VARS['smile_emotion'] : $HTTP_GET_VARS['smile_emotion'];
// If no code was entered complain ...
if ($smile_code == '' || $smile_url == '')
{
! message_die(MESSAGE, $lang['Fields_empty']);
}
//
--- 447,462 ----
//
$smile_code = ( isset($HTTP_POST_VARS['smile_code']) ) ? $HTTP_POST_VARS['smile_code'] : $HTTP_GET_VARS['smile_code'];
$smile_url = ( isset($HTTP_POST_VARS['smile_url']) ) ? $HTTP_POST_VARS['smile_url'] : $HTTP_GET_VARS['smile_url'];
+ $smile_url = phpbb_ltrim(basename($smile_url), "'");
$smile_emotion = ( isset($HTTP_POST_VARS['smile_emotion']) ) ? $HTTP_POST_VARS['smile_emotion'] : $HTTP_GET_VARS['smile_emotion'];
+ $smile_code = trim($smile_code);
+ $smile_url = trim($smile_url);
+ $smile_emotion = trim($smile_emotion);
// If no code was entered complain ...
if ($smile_code == '' || $smile_url == '')
{
! message_die(GENERAL_MESSAGE, $lang['Fields_empty']);
}
//
***************
*** 553,556 ****
//
include('./page_footer_admin.'.$phpEx);
! ?>
--- 558,561 ----
//
include('./page_footer_admin.'.$phpEx);
! ?>
\ No newline at end of file
diff -crN phpbb2013/admin/admin_styles.php phpbb2019/admin/admin_styles.php
*** phpbb2013/admin/admin_styles.php Sun Feb 27 20:30:44 2005
--- phpbb2019/admin/admin_styles.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_styles.php,v 1.27.2.13 2004/07/15 17:57:50 acydburn Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_styles.php,v 1.27.2.16 2005/12/18 13:57:50 grahamje Exp $
*
*
***************************************************************************/
***************
*** 27,33 ****
$file = basename(__FILE__);
$module['Styles']['Add_new'] = "$file?mode=addnew";
$module['Styles']['Create_new'] = "$file?mode=create";
! $module['Styles']['Manage'] = "$file";
$module['Styles']['Export'] = "$file?mode=export";
return;
}
--- 27,33 ----
$file = basename(__FILE__);
$module['Styles']['Add_new'] = "$file?mode=addnew";
$module['Styles']['Create_new'] = "$file?mode=create";
! $module['Styles']['Manage'] = $file;
$module['Styles']['Export'] = "$file?mode=export";
return;
}
***************
*** 75,81 ****
if( isset($install_to) )
{
! include($phpbb_root_path. "templates/" . $install_to . "/theme_info.cfg");
$template_name = $$install_to;
$found = FALSE;
--- 75,81 ----
if( isset($install_to) )
{
! include($phpbb_root_path. "templates/" . basename($install_to) . "/theme_info.cfg");
$template_name = $$install_to;
$found = FALSE;
***************
*** 582,587 ****
--- 582,588 ----
"L_SIMPLE_NAME" => $lang['Simple_name'],
"L_VALUE" => $lang['Value'],
"L_STYLESHEET" => $lang['Stylesheet'],
+ "L_STYLESHEET_EXPLAIN" => $lang['Stylesheet_explain'],
"L_BACKGROUND_IMAGE" => $lang['Background_image'],
"L_BACKGROUND_COLOR" => $lang['Background_color'],
"L_BODY_TEXT_COLOR" => $lang['Text_color'],
***************
*** 739,745 ****
@umask(0111);
! $fp = @fopen($phpbb_root_path . 'templates/' . $template_name . '/theme_info.cfg', 'w');
if( !$fp )
{
--- 740,746 ----
@umask(0111);
! $fp = @fopen($phpbb_root_path . 'templates/' . basename($template_name) . '/theme_info.cfg', 'w');
if( !$fp )
{
diff -crN phpbb2013/admin/admin_ug_auth.php phpbb2019/admin/admin_ug_auth.php
*** phpbb2013/admin/admin_ug_auth.php Sun Feb 27 20:30:44 2005
--- phpbb2019/admin/admin_ug_auth.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_ug_auth.php,v 1.13.2.5 2004/03/25 15:57:20 acydburn Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_ug_auth.php,v 1.13.2.10 2005/09/14 18:14:29 acydburn Exp $
*
*
***************************************************************************/
***************
*** 251,259 ****
}
}
! $sql = "SELECT *
! FROM " . FORUMS_TABLE . " f
! ORDER BY forum_order";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain forum information", "", __LINE__, __FILE__, $sql);
--- 251,260 ----
}
}
! $sql = 'SELECT f.*
! FROM ' . FORUMS_TABLE . ' f, ' . CATEGORIES_TABLE . ' c
! WHERE f.cat_id = c.cat_id
! ORDER BY c.cat_order, f.forum_order';
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain forum information", "", __LINE__, __FILE__, $sql);
***************
*** 414,419 ****
--- 415,421 ----
FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . USERS_TABLE . " u
WHERE ug.group_id = aa.group_id
AND u.user_id = ug.user_id
+ AND ug.user_pending = 0
AND u.user_level NOT IN (" . MOD . ", " . ADMIN . ")
GROUP BY u.user_id
HAVING SUM(aa.auth_mod) > 0";
***************
*** 508,513 ****
--- 510,557 ----
}
}
+ $sql = 'SELECT user_id FROM ' . USER_GROUP_TABLE . "
+ WHERE group_id = $group_id";
+ $result = $db->sql_query($sql);
+
+ $group_user = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $group_user[$row['user_id']] = $row['user_id'];
+ }
+ $db->sql_freeresult($result);
+
+ $sql = "SELECT ug.user_id, COUNT(auth_mod) AS is_auth_mod
+ FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug
+ WHERE ug.user_id IN (" . implode(', ', $group_user) . ")
+ AND aa.group_id = ug.group_id
+ AND aa.auth_mod = 1
+ GROUP BY ug.user_id";
+ if ( !($result = $db->sql_query($sql)) )
+ {
+ message_die(GENERAL_ERROR, 'Could not obtain moderator status', '', __LINE__, __FILE__, $sql);
+ }
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['is_auth_mod'])
+ {
+ unset($group_user[$row['user_id']]);
+ }
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($group_user))
+ {
+ $sql = "UPDATE " . USERS_TABLE . "
+ SET user_level = " . USER . "
+ WHERE user_id IN (" . implode(', ', $group_user) . ") AND user_level = " . MOD;
+ if ( !($result = $db->sql_query($sql)) )
+ {
+ message_die(GENERAL_ERROR, 'Could not update user level', '', __LINE__, __FILE__, $sql);
+ }
+ }
+
message_die(GENERAL_MESSAGE, $message);
}
}
***************
*** 526,534 ****
//
// Front end
//
! $sql = "SELECT *
! FROM " . FORUMS_TABLE . " f
! ORDER BY forum_order";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain forum information", "", __LINE__, __FILE__, $sql);
--- 570,579 ----
//
// Front end
//
! $sql = "SELECT f.*
! FROM " . FORUMS_TABLE . " f, " . CATEGORIES_TABLE . " c
! WHERE f.cat_id = c.cat_id
! ORDER BY c.cat_order, f.forum_order ASC";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain forum information", "", __LINE__, __FILE__, $sql);
***************
*** 561,567 ****
}
}
! $sql = "SELECT u.user_id, u.username, u.user_level, g.group_id, g.group_name, g.group_single_user FROM " . USERS_TABLE . " u, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug WHERE ";
$sql .= ( $mode == 'user' ) ? "u.user_id = $user_id AND ug.user_id = u.user_id AND g.group_id = ug.group_id" : "g.group_id = $group_id AND ug.group_id = g.group_id AND u.user_id = ug.user_id";
if ( !($result = $db->sql_query($sql)) )
{
--- 606,612 ----
}
}
! $sql = "SELECT u.user_id, u.username, u.user_level, g.group_id, g.group_name, g.group_single_user, ug.user_pending FROM " . USERS_TABLE . " u, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug WHERE ";
$sql .= ( $mode == 'user' ) ? "u.user_id = $user_id AND ug.user_id = u.user_id AND g.group_id = ug.group_id" : "g.group_id = $group_id AND ug.group_id = g.group_id AND u.user_id = ug.user_id";
if ( !($result = $db->sql_query($sql)) )
{
***************
*** 764,770 ****
$i++;
}
! @reset($auth_user);
if ( $mode == 'user' )
{
--- 809,815 ----
$i++;
}
! // @reset($auth_user);
if ( $mode == 'user' )
{
***************
*** 787,806 ****
}
}
if( count($name) )
{
- $t_usergroup_list = '';
for($i = 0; $i < count($ug_info); $i++)
{
$ug = ( $mode == 'user' ) ? 'group&' . POST_GROUPS_URL : 'user&' . POST_USERS_URL;
! $t_usergroup_list .= ( ( $t_usergroup_list != '' ) ? ', ' : '' ) . '' . $name[$i] . '';
}
}
! else
! {
! $t_usergroup_list = $lang['None'];
! }
$s_column_span = 2; // Two columns always present
if( !$adv )
--- 832,857 ----
}
}
+ $t_usergroup_list = $t_pending_list = '';
if( count($name) )
{
for($i = 0; $i < count($ug_info); $i++)
{
$ug = ( $mode == 'user' ) ? 'group&' . POST_GROUPS_URL : 'user&' . POST_USERS_URL;
! if (!$ug_info[$i]['user_pending'])
! {
! $t_usergroup_list .= ( ( $t_usergroup_list != '' ) ? ', ' : '' ) . '' . $name[$i] . '';
! }
! else
! {
! $t_pending_list .= ( ( $t_pending_list != '' ) ? ', ' : '' ) . '' . $name[$i] . '';
! }
}
}
!
! $t_usergroup_list = ($t_usergroup_list == '') ? $lang['None'] : $t_usergroup_list;
! $t_pending_list = ($t_pending_list == '') ? $lang['None'] : $t_pending_list;
$s_column_span = 2; // Two columns always present
if( !$adv )
***************
*** 857,863 ****
$template->assign_vars(array(
'USERNAME' => $t_groupname,
! 'GROUP_MEMBERSHIP' => $lang['Usergroup_members'] . ' : ' . $t_usergroup_list)
);
}
--- 908,914 ----
$template->assign_vars(array(
'USERNAME' => $t_groupname,
! 'GROUP_MEMBERSHIP' => $lang['Usergroup_members'] . ' : ' . $t_usergroup_list . '
' . $lang['Pending_members'] . ' : ' . $t_pending_list)
);
}
diff -crN phpbb2013/admin/admin_user_ban.php phpbb2019/admin/admin_user_ban.php
*** phpbb2013/admin/admin_user_ban.php Sun Feb 27 20:30:44 2005
--- phpbb2019/admin/admin_user_ban.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_user_ban.php,v 1.21.2.5 2004/03/25 15:57:20 acydburn Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_user_ban.php,v 1.21.2.6 2005/10/30 15:17:13 acydburn Exp $
*
*
***************************************************************************/
***************
*** 155,161 ****
// contained in the annotated php manual at php.com (ereg
// section)
//
! if (preg_match('#^(([a-z0-9&.-_+])|(\*))+@[a-z0-9\-]+\.([a-z0-9\-]+\.)*?[a-z]+$#is', trim($email_list_temp[$i])))
{
$email_list[] = trim($email_list_temp[$i]);
}
--- 155,161 ----
// contained in the annotated php manual at php.com (ereg
// section)
//
! if (preg_match('/^(([a-z0-9&\'\.\-_\+])|(\*))+@(([a-z0-9\-])|(\*))+\.([a-z0-9\-]+\.)*?[a-z]+$/is', trim($email_list_temp[$i])))
{
$email_list[] = trim($email_list_temp[$i]);
}
diff -crN phpbb2013/admin/admin_users.php phpbb2019/admin/admin_users.php
*** phpbb2013/admin/admin_users.php Sun Feb 27 20:30:44 2005
--- phpbb2019/admin/admin_users.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_users.php,v 1.57.2.26 2004/03/25 15:57:20 acydburn Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_users.php,v 1.57.2.31 2005/12/20 20:42:28 grahamje Exp $
*
*
***************************************************************************/
***************
*** 71,77 ****
message_die(GENERAL_MESSAGE, $lang['No_user_id_specified'] );
}
! if( $HTTP_POST_VARS['deleteuser'] )
{
$sql = "SELECT g.group_id
FROM " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g
--- 71,77 ----
message_die(GENERAL_MESSAGE, $lang['No_user_id_specified'] );
}
! if( $HTTP_POST_VARS['deleteuser'] && ( $userdata['user_id'] != $user_id ) )
{
$sql = "SELECT g.group_id
FROM " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g
***************
*** 86,92 ****
$row = $db->sql_fetchrow($result);
$sql = "UPDATE " . POSTS_TABLE . "
! SET poster_id = " . DELETED . ", post_username = '$username'
WHERE poster_id = $user_id";
if( !$db->sql_query($sql) )
{
--- 86,92 ----
$row = $db->sql_fetchrow($result);
$sql = "UPDATE " . POSTS_TABLE . "
! SET poster_id = " . DELETED . ", post_username = '" . str_replace("\\'", "''", addslashes($this_userdata['username'])) . "'
WHERE poster_id = $user_id";
if( !$db->sql_query($sql) )
{
***************
*** 177,182 ****
--- 177,196 ----
message_die(GENERAL_ERROR, 'Could not delete user from banlist table', '', __LINE__, __FILE__, $sql);
}
+ $sql = "DELETE FROM " . SESSIONS_TABLE . "
+ WHERE session_user_id = $user_id";
+ if ( !$db->sql_query($sql) )
+ {
+ message_die(GENERAL_ERROR, 'Could not delete sessions for this user', '', __LINE__, __FILE__, $sql);
+ }
+
+ $sql = "DELETE FROM " . SESSIONS_KEYS_TABLE . "
+ WHERE user_id = $user_id";
+ if ( !$db->sql_query($sql) )
+ {
+ message_die(GENERAL_ERROR, 'Could not delete auto-login keys for this user', '', __LINE__, __FILE__, $sql);
+ }
+
$sql = "SELECT privmsgs_id
FROM " . PRIVMSGS_TABLE . "
WHERE privmsgs_from_userid = $user_id
***************
*** 217,223 ****
message_die(GENERAL_MESSAGE, $message);
}
! $username = ( !empty($HTTP_POST_VARS['username']) ) ? trim(strip_tags(htmlspecialchars($HTTP_POST_VARS['username']))) : '';
$email = ( !empty($HTTP_POST_VARS['email']) ) ? trim(strip_tags(htmlspecialchars( $HTTP_POST_VARS['email'] ) )) : '';
$password = ( !empty($HTTP_POST_VARS['password']) ) ? trim(strip_tags(htmlspecialchars( $HTTP_POST_VARS['password'] ) )) : '';
--- 231,237 ----
message_die(GENERAL_MESSAGE, $message);
}
! $username = ( !empty($HTTP_POST_VARS['username']) ) ? phpbb_clean_username($HTTP_POST_VARS['username']) : '';
$email = ( !empty($HTTP_POST_VARS['email']) ) ? trim(strip_tags(htmlspecialchars( $HTTP_POST_VARS['email'] ) )) : '';
$password = ( !empty($HTTP_POST_VARS['password']) ) ? trim(strip_tags(htmlspecialchars( $HTTP_POST_VARS['password'] ) )) : '';
***************
*** 254,259 ****
--- 268,274 ----
$user_dateformat = ( $HTTP_POST_VARS['dateformat'] ) ? trim( $HTTP_POST_VARS['dateformat'] ) : $board_config['default_dateformat'];
$user_avatar_local = ( isset( $HTTP_POST_VARS['avatarselect'] ) && !empty($HTTP_POST_VARS['submitavatar'] ) && $board_config['allow_avatar_local'] ) ? $HTTP_POST_VARS['avatarselect'] : ( ( isset( $HTTP_POST_VARS['avatarlocal'] ) ) ? $HTTP_POST_VARS['avatarlocal'] : '' );
+ $user_avatar_category = ( isset($HTTP_POST_VARS['avatarcatname']) && $board_config['allow_avatar_local'] ) ? htmlspecialchars($HTTP_POST_VARS['avatarcatname']) : '' ;
$user_avatar_remoteurl = ( !empty($HTTP_POST_VARS['avatarremoteurl']) ) ? trim( $HTTP_POST_VARS['avatarremoteurl'] ) : '';
$user_avatar_url = ( !empty($HTTP_POST_VARS['avatarurl']) ) ? trim( $HTTP_POST_VARS['avatarurl'] ) : '';
***************
*** 293,299 ****
if ( !isset($HTTP_POST_VARS['cancelavatar']))
{
! $user_avatar = $user_avatar_local;
$user_avatar_type = USER_AVATAR_GALLERY;
}
}
--- 308,314 ----
if ( !isset($HTTP_POST_VARS['cancelavatar']))
{
! $user_avatar = $user_avatar_category . '/' . $user_avatar_local;
$user_avatar_type = USER_AVATAR_GALLERY;
}
}
***************
*** 389,397 ****
{
if( $this_userdata['user_avatar_type'] == USER_AVATAR_UPLOAD && $this_userdata['user_avatar'] != "" )
{
! if( @file_exists(@phpbb_realpath("./" . $board_config['avatar_path'] . "/" . $this_userdata['user_avatar'])) )
{
! @unlink("./" . $board_config['avatar_path'] . "/" . $this_userdata['user_avatar']);
}
}
$avatar_sql = ", user_avatar = '', user_avatar_type = " . USER_AVATAR_NONE;
--- 404,412 ----
{
if( $this_userdata['user_avatar_type'] == USER_AVATAR_UPLOAD && $this_userdata['user_avatar'] != "" )
{
! if( @file_exists(@phpbb_realpath('./../' . $board_config['avatar_path'] . "/" . $this_userdata['user_avatar'])) )
{
! @unlink('./../' . $board_config['avatar_path'] . "/" . $this_userdata['user_avatar']);
}
}
$avatar_sql = ", user_avatar = '', user_avatar_type = " . USER_AVATAR_NONE;
***************
*** 645,651 ****
}
else if( $user_avatar_local != "" && $avatar_sql == "" && !$error )
{
! $avatar_sql = ", user_avatar = '" . str_replace("\'", "''", $user_avatar_local) . "', user_avatar_type = " . USER_AVATAR_GALLERY;
}
//
--- 660,666 ----
}
else if( $user_avatar_local != "" && $avatar_sql == "" && !$error )
{
! $avatar_sql = ", user_avatar = '" . str_replace("\'", "''", phpbb_ltrim(basename($user_avatar_category), "'") . '/' . phpbb_ltrim(basename($user_avatar_local), "'")) . "', user_avatar_type = " . USER_AVATAR_GALLERY;
}
//
***************
*** 822,828 ****
{
if( preg_match("/(\.gif$|\.png$|\.jpg)$/is", $sub_file) )
{
! $avatar_images[$file][$avatar_row_count][$avatar_col_count] = $file . "/" . $sub_file;
$avatar_col_count++;
if( $avatar_col_count == 5 )
--- 837,843 ----
{
if( preg_match("/(\.gif$|\.png$|\.jpg)$/is", $sub_file) )
{
! $avatar_images[$file][$avatar_row_count][$avatar_col_count] = $sub_file;
$avatar_col_count++;
if( $avatar_col_count == 5 )
***************
*** 867,873 ****
for($j = 0; $j < count($avatar_images[$category][$i]); $j++)
{
$template->assign_block_vars("avatar_row.avatar_column", array(
! "AVATAR_IMAGE" => "../" . $board_config['avatar_gallery_path'] . "/" . $avatar_images[$category][$i][$j])
);
$template->assign_block_vars("avatar_row.avatar_option_column", array(
--- 882,888 ----
for($j = 0; $j < count($avatar_images[$category][$i]); $j++)
{
$template->assign_block_vars("avatar_row.avatar_column", array(
! "AVATAR_IMAGE" => "../" . $board_config['avatar_gallery_path'] . '/' . $category . '/' . $avatar_images[$category][$i][$j])
);
$template->assign_block_vars("avatar_row.avatar_option_column", array(
***************
*** 878,884 ****
$coppa = ( ( !$HTTP_POST_VARS['coppa'] && !$HTTP_GET_VARS['coppa'] ) || $mode == "register") ? 0 : TRUE;
! $s_hidden_fields = '';
$s_hidden_fields .= '';
$s_hidden_fields .= '';
--- 893,899 ----
$coppa = ( ( !$HTTP_POST_VARS['coppa'] && !$HTTP_GET_VARS['coppa'] ) || $mode == "register") ? 0 : TRUE;
! $s_hidden_fields = '';
$s_hidden_fields .= '';
$s_hidden_fields .= '';
***************
*** 934,940 ****
if( !empty($user_avatar_local) )
{
! $s_hidden_fields .= '';
}
if( $user_avatar_type )
--- 949,955 ----
if( !empty($user_avatar_local) )
{
! $s_hidden_fields .= '';
}
if( $user_avatar_type )
diff -crN phpbb2013/admin/admin_words.php phpbb2019/admin/admin_words.php
*** phpbb2013/admin/admin_words.php Sun Feb 27 20:30:44 2005
--- phpbb2019/admin/admin_words.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_words.php,v 1.10.2.3 2004/03/25 15:57:20 acydburn Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_words.php,v 1.10.2.4 2005/12/18 13:57:51 grahamje Exp $
*
*
***************************************************************************/
***************
*** 25,31 ****
if( !empty($setmodules) )
{
$file = basename(__FILE__);
! $module['General']['Word_Censor'] = "$file";
return;
}
--- 25,31 ----
if( !empty($setmodules) )
{
$file = basename(__FILE__);
! $module['General']['Word_Censor'] = $file;
return;
}
diff -crN phpbb2013/admin/index.php phpbb2019/admin/index.php
*** phpbb2013/admin/index.php Sun Feb 27 20:30:44 2005
--- phpbb2019/admin/index.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: index.php,v 1.40.2.7 2005/02/21 18:37:02 acydburn Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: index.php,v 1.40.2.10 2005/12/04 12:55:28 grahamje Exp $
*
*
***************************************************************************/
***************
*** 60,66 ****
{
if( preg_match("/^admin_.*?\." . $phpEx . "$/", $file) )
{
! include($file);
}
}
--- 60,66 ----
{
if( preg_match("/^admin_.*?\." . $phpEx . "$/", $file) )
{
! include('./' . $file);
}
}
***************
*** 234,242 ****
$row = $db->sql_fetchrow($result);
$version = $row['mysql_version'];
! if( preg_match("/^(3\.23|4\.)/", $version) )
{
! $db_name = ( preg_match("/^(3\.23\.[6-9])|(3\.23\.[1-9][1-9])|(4\.)/", $version) ) ? "`$dbname`" : $dbname;
$sql = "SHOW TABLE STATUS
FROM " . $db_name;
--- 234,242 ----
$row = $db->sql_fetchrow($result);
$version = $row['mysql_version'];
! if( preg_match("/^(3\.23|4\.|5\.)/", $version) )
{
! $db_name = ( preg_match("/^(3\.23\.[6-9])|(3\.23\.[1-9][1-9])|(4\.)|(5\.)/", $version) ) ? "`$dbname`" : $dbname;
$sql = "SHOW TABLE STATUS
FROM " . $db_name;
***************
*** 567,573 ****
$errno = 0;
$errstr = $version_info = '';
! if ($fsock = @fsockopen('www.phpbb.com', 80, $errno, $errstr))
{
@fputs($fsock, "GET /updatecheck/20x.txt HTTP/1.1\r\n");
@fputs($fsock, "HOST: www.phpbb.com\r\n");
--- 567,573 ----
$errno = 0;
$errstr = $version_info = '';
! if ($fsock = @fsockopen('www.phpbb.com', 80, $errno, $errstr, 10))
{
@fputs($fsock, "GET /updatecheck/20x.txt HTTP/1.1\r\n");
@fputs($fsock, "HOST: www.phpbb.com\r\n");
***************
*** 602,608 ****
else
{
$version_info = '
' . $lang['Version_not_up_to_date'];
! $version_info .= '
' . sprintf($lang['Latest_version_info'], $latest_version) . sprintf($lang['Current_version_info'], '2' . $board_config['version']) . '
';
}
}
else
--- 602,608 ----
else
{
$version_info = '' . $lang['Version_not_up_to_date'];
! $version_info .= '
' . sprintf($lang['Latest_version_info'], $latest_version) . ' ' . sprintf($lang['Current_version_info'], '2' . $board_config['version']) . '
';
}
}
else
diff -crN phpbb2013/admin/page_footer_admin.php phpbb2019/admin/page_footer_admin.php
*** phpbb2013/admin/page_footer_admin.php Sun Feb 27 20:30:44 2005
--- phpbb2019/admin/page_footer_admin.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: page_footer_admin.php,v 1.9.2.2 2002/05/12 15:57:45 psotfx Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: page_footer_admin.php,v 1.9.2.5 2005/09/19 20:49:06 grahamje Exp $
*
*
***************************************************************************/
***************
*** 25,30 ****
--- 25,32 ----
die("Hacking attempt");
}
+ global $do_gzip_compress;
+
//
// Show the overall footer.
//
***************
*** 33,40 ****
);
$template->assign_vars(array(
! 'PHPBB_VERSION' => '2' . $board_config['version'],
! 'TRANSLATION_INFO' => $lang['TRANSLATION_INFO'])
);
$template->pparse('page_footer');
--- 35,42 ----
);
$template->assign_vars(array(
! 'PHPBB_VERSION' => ($userdata['user_level'] == ADMIN && $userdata['user_id'] != ANONYMOUS) ? '2' . $board_config['version'] : '',
! 'TRANSLATION_INFO' => (isset($lang['TRANSLATION_INFO'])) ? $lang['TRANSLATION_INFO'] : ((isset($lang['TRANSLATION'])) ? $lang['TRANSLATION'] : ''))
);
$template->pparse('page_footer');
diff -crN phpbb2013/admin/page_header_admin.php phpbb2019/admin/page_header_admin.php
*** phpbb2013/admin/page_header_admin.php Sun Feb 27 20:30:44 2005
--- phpbb2019/admin/page_header_admin.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: page_header_admin.php,v 1.12.2.5 2003/06/10 20:48:18 acydburn Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: page_header_admin.php,v 1.12.2.6 2005/03/26 14:15:59 acydburn Exp $
*
*
***************************************************************************/
***************
*** 35,41 ****
{
$phpver = phpversion();
! $useragent = (isset($_SERVER["HTTP_USER_AGENT"]) ) ? $_SERVER["HTTP_USER_AGENT"] : $HTTP_USER_AGENT;
if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) )
{
--- 35,41 ----
{
$phpver = phpversion();
! $useragent = (isset($HTTP_SERVER_VARS['HTTP_USER_AGENT'])) ? $HTTP_SERVER_VARS['HTTP_USER_AGENT'] : getenv('HTTP_USER_AGENT');
if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) )
{
diff -crN phpbb2013/admin/pagestart.php phpbb2019/admin/pagestart.php
*** phpbb2013/admin/pagestart.php Sun Feb 27 20:30:44 2005
--- phpbb2019/admin/pagestart.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: pagestart.php,v 1.1.2.7 2004/03/24 14:43:31 psotfx Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: pagestart.php,v 1.1.2.9 2005/06/26 14:39:30 acydburn Exp $
*
*
***************************************************************************/
***************
*** 40,46 ****
if (!$userdata['session_logged_in'])
{
! redirect(append_sid("login.$phpEx?redirect=admin/", true));
}
else if ($userdata['user_level'] != ADMIN)
{
--- 40,46 ----
if (!$userdata['session_logged_in'])
{
! redirect(append_sid("login.$phpEx?redirect=admin/index.$phpEx", true));
}
else if ($userdata['user_level'] != ADMIN)
{
***************
*** 59,64 ****
--- 59,69 ----
redirect("index.$phpEx?sid=" . $userdata['session_id']);
}
+ if (!$userdata['session_admin'])
+ {
+ redirect(append_sid("login.$phpEx?redirect=admin/index.$phpEx&admin=1", true));
+ }
+
if (empty($no_page_header))
{
// Not including the pageheader can be neccesarry if META tags are
diff -crN phpbb2013/common.php phpbb2019/common.php
*** phpbb2013/common.php Sun Feb 27 20:30:46 2005
--- phpbb2019/common.php Fri Dec 30 11:38:19 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: common.php,v 1.74.2.17 2005/02/21 19:29:30 acydburn Exp $
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: common.php,v 1.74.2.22 2005/12/30 09:51:01 acydburn Exp $
*
***************************************************************************/
***************
*** 28,37 ****
error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables
set_magic_quotes_runtime(0); // Disable magic_quotes_runtime
! // The following code (unsetting globals) was contributed by Matt Kavanagh
// PHP5 with register_long_arrays off?
! if (!isset($HTTP_POST_VARS) && isset($_POST))
{
$HTTP_POST_VARS = $_POST;
$HTTP_GET_VARS = $_GET;
--- 28,38 ----
error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables
set_magic_quotes_runtime(0); // Disable magic_quotes_runtime
! // The following code (unsetting globals)
! // Thanks to Matt Kavanagh and Stefan Esser for providing feedback as well as patch files
// PHP5 with register_long_arrays off?
! if (@phpversion() >= '5.0.0' && (!@ini_get('register_long_arrays') || @ini_get('register_long_arrays') == '0' || strtolower(@ini_get('register_long_arrays')) == 'off'))
{
$HTTP_POST_VARS = $_POST;
$HTTP_GET_VARS = $_GET;
***************
*** 47,75 ****
}
}
! if (@phpversion() < '4.0.0')
{
! // PHP3 path; in PHP3, globals are _always_ registered
!
! // We 'flip' the array of variables to test like this so that
! // we can validate later with isset($test[$var]) (no in_array())
! $test = array('HTTP_GET_VARS' => NULL, 'HTTP_POST_VARS' => NULL, 'HTTP_COOKIE_VARS' => NULL, 'HTTP_SERVER_VARS' => NULL, 'HTTP_ENV_VARS' => NULL, 'HTTP_POST_FILES' => NULL, 'phpEx' => NULL, 'phpbb_root_path' => NULL);
!
! // Loop through each input array
! @reset($test);
! while (list($input,) = @each($test))
! {
! while (list($var,) = @each($$input))
! {
! // Validate the variable to be unset
! if (!isset($test[$var]) && $var != 'test' && $var != 'input')
! {
! unset($$var);
! }
! }
! }
}
! else if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on')
{
// PHP4+ path
$not_unset = array('HTTP_GET_VARS', 'HTTP_POST_VARS', 'HTTP_COOKIE_VARS', 'HTTP_SERVER_VARS', 'HTTP_SESSION_VARS', 'HTTP_ENV_VARS', 'HTTP_POST_FILES', 'phpEx', 'phpbb_root_path');
--- 48,66 ----
}
}
! // Protect against GLOBALS tricks
! if (isset($HTTP_POST_VARS['GLOBALS']) || isset($HTTP_POST_FILES['GLOBALS']) || isset($HTTP_GET_VARS['GLOBALS']) || isset($HTTP_COOKIE_VARS['GLOBALS']))
{
! die("Hacking attempt");
}
!
! // Protect against HTTP_SESSION_VARS tricks
! if (isset($HTTP_SESSION_VARS) && !is_array($HTTP_SESSION_VARS))
! {
! die("Hacking attempt");
! }
!
! if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on')
{
// PHP4+ path
$not_unset = array('HTTP_GET_VARS', 'HTTP_POST_VARS', 'HTTP_COOKIE_VARS', 'HTTP_SERVER_VARS', 'HTTP_SESSION_VARS', 'HTTP_ENV_VARS', 'HTTP_POST_FILES', 'phpEx', 'phpbb_root_path');
***************
*** 77,83 ****
// Not only will array_merge give a warning if a parameter
// is not an array, it will actually fail. So we check if
// HTTP_SESSION_VARS has been initialised.
! if (!isset($HTTP_SESSION_VARS))
{
$HTTP_SESSION_VARS = array();
}
--- 68,74 ----
// Not only will array_merge give a warning if a parameter
// is not an array, it will actually fail. So we check if
// HTTP_SESSION_VARS has been initialised.
! if (!isset($HTTP_SESSION_VARS) || !is_array($HTTP_SESSION_VARS))
{
$HTTP_SESSION_VARS = array();
}
***************
*** 96,102 ****
unset($$var);
}
}
!
unset($input);
}
--- 87,93 ----
unset($$var);
}
}
!
unset($input);
}
***************
*** 185,191 ****
if( !defined("PHPBB_INSTALLED") )
{
! header("Location: install/install.$phpEx");
exit;
}
--- 176,182 ----
if( !defined("PHPBB_INSTALLED") )
{
! header('Location: ' . $phpbb_root_path . 'install/install.' . $phpEx);
exit;
}
***************
*** 196,201 ****
--- 187,195 ----
include($phpbb_root_path . 'includes/functions.'.$phpEx);
include($phpbb_root_path . 'includes/db.'.$phpEx);
+ // We do not need this any longer, unset for safety purposes
+ unset($dbpasswd);
+
//
// Obtain and encode users IP
//
***************
*** 226,232 ****
if (file_exists('install') || file_exists('contrib'))
{
! message_die(GENERAL_MESSAGE, 'Please ensure both the install/ and contrib/ directories are deleted');
}
//
--- 220,226 ----
if (file_exists('install') || file_exists('contrib'))
{
! message_die(GENERAL_MESSAGE, 'Please_remove_install_contrib');
}
//
diff -crN phpbb2013/db/mysql.php phpbb2019/db/mysql.php
*** phpbb2013/db/mysql.php Sun Feb 27 20:30:44 2005
--- phpbb2019/db/mysql.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: mysql.php,v 1.16 2002/03/19 01:07:36 psotfx Exp $
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: mysql.php,v 1.16.2.1 2005/09/18 16:17:20 acydburn Exp $
*
***************************************************************************/
***************
*** 259,265 ****
{
if($this->rowset[$query_id])
{
! $result = $this->rowset[$query_id][$field];
}
else if($this->row[$query_id])
{
--- 259,265 ----
{
if($this->rowset[$query_id])
{
! $result = $this->rowset[$query_id][0][$field];
}
else if($this->row[$query_id])
{
diff -crN phpbb2013/db/mysql4.php phpbb2019/db/mysql4.php
*** phpbb2013/db/mysql4.php Sun Feb 27 20:30:44 2005
--- phpbb2019/db/mysql4.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : supportphpbb.com
*
! * $Id: mysql4.php,v 1.5 2002/04/02 21:13:47 the_systech Exp $
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : supportphpbb.com
*
! * $Id: mysql4.php,v 1.5.2.1 2005/09/18 16:17:20 acydburn Exp $
*
***************************************************************************/
***************
*** 271,277 ****
{
if( $this->rowset[$query_id] )
{
! $result = $this->rowset[$query_id][$field];
}
else if( $this->row[$query_id] )
{
--- 271,277 ----
{
if( $this->rowset[$query_id] )
{
! $result = $this->rowset[$query_id][0][$field];
}
else if( $this->row[$query_id] )
{
diff -crN phpbb2013/db/oracle.php phpbb2019/db/oracle.php
*** phpbb2013/db/oracle.php Sun Feb 27 20:30:44 2005
--- phpbb2019/db/oracle.php Thu Jan 1 01:00:00 1970
***************
*** 1,472 ****
- persistency = $persistency;
- $this->user = $sqluser;
- $this->password = $sqlpassword;
- $this->server = $sqlserver;
- $this->dbname = $database;
-
- if($this->persistency)
- {
- $this->db_connect_id = @OCIPLogon($this->user, $this->password, $this->server);
- }
- else
- {
- $this->db_connect_id = @OCINLogon($this->user, $this->password, $this->server);
- }
- if($this->db_connect_id)
- {
- return $this->db_connect_id;
- }
- else
- {
- return false;
- }
- }
-
- //
- // Other base methods
- //
- function sql_close()
- {
- if($this->db_connect_id)
- {
- // Commit outstanding transactions
- if($this->in_transaction)
- {
- OCICommit($this->db_connect_id);
- }
-
- if($this->query_result)
- {
- @OCIFreeStatement($this->query_result);
- }
- $result = @OCILogoff($this->db_connect_id);
- return $result;
- }
- else
- {
- return false;
- }
- }
-
- //
- // Base query method
- //
- function sql_query($query = "", $transaction = FALSE)
- {
- // Remove any pre-existing queries
- unset($this->query_result);
-
- // Put us in transaction mode because with Oracle as soon as you make a query you're in a transaction
- $this->in_transaction = TRUE;
-
- if($query != "")
- {
- $this->last_query = $query;
- $this->num_queries++;
-
- if(eregi("LIMIT", $query))
- {
- preg_match("/^(.*)LIMIT ([0-9]+)[, ]*([0-9]+)*/s", $query, $limits);
-
- $query = $limits[1];
- if($limits[3])
- {
- $row_offset = $limits[2];
- $num_rows = $limits[3];
- }
- else
- {
- $row_offset = 0;
- $num_rows = $limits[2];
- }
- }
-
- if(eregi("^(INSERT|UPDATE) ", $query))
- {
- $query = preg_replace("/\\\'/s", "''", $query);
- }
-
- $this->query_result = @OCIParse($this->db_connect_id, $query);
- $success = @OCIExecute($this->query_result, OCI_DEFAULT);
- }
- if($success)
- {
- if($transaction == END_TRANSACTION)
- {
- OCICommit($this->db_connect_id);
- $this->in_transaction = FALSE;
- }
-
- unset($this->row[$this->query_result]);
- unset($this->rowset[$this->query_result]);
- $this->last_query_text[$this->query_result] = $query;
-
- return $this->query_result;
- }
- else
- {
- if($this->in_transaction)
- {
- OCIRollback($this->db_connect_id);
- }
- return false;
- }
- }
-
- //
- // Other query methods
- //
- function sql_numrows($query_id = 0)
- {
- if(!$query_id)
- {
- $query_id = $this->query_result;
- }
- if($query_id)
- {
- $result = @OCIFetchStatement($query_id, $this->rowset);
- // OCIFetchStatment kills our query result so we have to execute the statment again
- // if we ever want to use the query_id again.
- @OCIExecute($query_id, OCI_DEFAULT);
- return $result;
- }
- else
- {
- return false;
- }
- }
- function sql_affectedrows($query_id = 0)
- {
- if(!$query_id)
- {
- $query_id = $this->query_result;
- }
- if($query_id)
- {
- $result = @OCIRowCount($query_id);
- return $result;
- }
- else
- {
- return false;
- }
- }
- function sql_numfields($query_id = 0)
- {
- if(!$query_id)
- {
- $query_id = $this->query_result;
- }
- if($query_id)
- {
- $result = @OCINumCols($query_id);
- return $result;
- }
- else
- {
- return false;
- }
- }
- function sql_fieldname($offset, $query_id = 0)
- {
- // OCIColumnName uses a 1 based array so we have to up the offset by 1 in here to maintain
- // full abstraction compatibitly
- $offset += 1;
- if(!$query_id)
- {
- $query_id = $this->query_result;
- }
- if($query_id)
- {
- $result = strtolower(@OCIColumnName($query_id, $offset));
- return $result;
- }
- else
- {
- return false;
- }
- }
- function sql_fieldtype($offset, $query_id = 0)
- {
- // This situation is the same as fieldname
- $offset += 1;
- if(!$query_id)
- {
- $query_id = $this->query_result;
- }
- if($query_id)
- {
- $result = @OCIColumnType($query_id, $offset);
- return $result;
- }
- else
- {
- return false;
- }
- }
- function sql_fetchrow($query_id = 0, $debug = FALSE)
- {
- if(!$query_id)
- {
- $query_id = $this->query_result;
- }
- if($query_id)
- {
- $result_row = "";
- $result = @OCIFetchInto($query_id, $result_row, OCI_ASSOC+OCI_RETURN_NULLS);
- if($debug)
- {
- echo "Query was: ".$this->last_query . "
";
- echo "Result: $result
";
- echo "Query ID: $query_id
";
- echo "";
- var_dump($result_row);
- echo "
";
- }
- if($result_row == "")
- {
- return false;
- }
-
- for($i = 0; $i < count($result_row); $i++)
- {
- list($key, $val) = each($result_row);
- $return_arr[strtolower($key)] = $val;
- }
- $this->row[$query_id] = $return_arr;
-
- return $this->row[$query_id];
- }
- else
- {
- return false;
- }
- }
- // This function probably isn't as efficant is it could be but any other way I do it
- // I end up losing 1 row...
- function sql_fetchrowset($query_id = 0)
- {
- if(!$query_id)
- {
- $query_id = $this->query_result;
- }
- if($query_id)
- {
- $rows = @OCIFetchStatement($query_id, $results);
- @OCIExecute($query_id, OCI_DEFAULT);
- for($i = 0; $i < $rows; $i++)
- {
- @OCIFetchInto($query_id, $tmp_result, OCI_ASSOC+OCI_RETURN_NULLS);
-
- for($j = 0; $j < count($tmp_result); $j++)
- {
- list($key, $val) = each($tmp_result);
- $return_arr[strtolower($key)] = $val;
- }
- $result[] = $return_arr;
- }
- return $result;
- }
- else
- {
- return false;
- }
- }
- function sql_fetchfield($field, $rownum = -1, $query_id = 0)
- {
- if(!$query_id)
- {
- $query_id = $this->query_result;
- }
- if($query_id)
- {
- if($rownum > -1)
- {
- // Reset the internal rownum pointer.
- @OCIExecute($query_id, OCI_DEFAULT);
- for($i = 0; $i < $rownum; $i++)
- {
- // Move the interal pointer to the row we want
- @OCIFetch($query_id);
- }
- // Get the field data.
- $result = @OCIResult($query_id, strtoupper($field));
- }
- else
- {
- // The internal pointer should be where we want it
- // so we just grab the field out of the current row.
- $result = @OCIResult($query_id, strtoupper($field));
- }
- return $result;
- }
- else
- {
- return false;
- }
- }
- function sql_rowseek($rownum, $query_id = 0)
- {
- if(!$query_id)
- {
- $query_id = $this->query_result;
- }
- if($query_id)
- {
- @OCIExecute($query_id, OCI_DEFAULT);
- for($i = 0; $i < $rownum; $i++)
- {
- @OCIFetch($query_id);
- }
- $result = @OCIFetch($query_id);
- return $result;
- }
- else
- {
- return false;
- }
- }
- function sql_nextid($query_id = 0)
- {
- if(!$query_id)
- {
- $query_id = $this->query_result;
- }
- if($query_id && $this->last_query_text[$query_id] != "")
- {
- if( eregi("^(INSERT{1}|^INSERT INTO{1})[[:space:]][\"]?([a-zA-Z0-9\_\-]+)[\"]?", $this->last_query_text[$query_id], $tablename))
- {
- $query = "SELECT ".$tablename[2]."_id_seq.currval FROM DUAL";
- $stmt = @OCIParse($this->db_connect_id, $query);
- @OCIExecute($stmt,OCI_DEFAULT );
- $temp_result = @OCIFetchInto($stmt, $temp_result, OCI_ASSOC+OCI_RETURN_NULLS);
- if($temp_result)
- {
- return $temp_result['CURRVAL'];
- }
- else
- {
- return false;
- }
- }
- else
- {
- return false;
- }
- }
- else
- {
- return false;
- }
- }
-
- function sql_nextid($query_id = 0)
- {
- if(!$query_id)
- {
- $query_id = $this->query_result;
- }
- if($query_id && $this->last_query_text[$query_id] != "")
- {
- if( eregi("^(INSERT{1}|^INSERT INTO{1})[[:space:]][\"]?([a-zA-Z0-9\_\-]+)[\"]?", $this->last_query_text[$query_id], $tablename))
- {
- $query = "SELECT ".$tablename[2]."_id_seq.CURRVAL FROM DUAL";
- $temp_q_id = @OCIParse($this->db_connect_id, $query);
- @OCIExecute($temp_q_id, OCI_DEFAULT);
- @OCIFetchInto($temp_q_id, $temp_result, OCI_ASSOC+OCI_RETURN_NULLS);
-
- if($temp_result)
- {
- return $temp_result['CURRVAL'];
- }
- else
- {
- return false;
- }
- }
- else
- {
- return false;
- }
- }
- else
- {
- return false;
- }
- }
-
-
-
- function sql_freeresult($query_id = 0)
- {
- if(!$query_id)
- {
- $query_id = $this->query_result;
- }
- if($query_id)
- {
- $result = @OCIFreeStatement($query_id);
- return $result;
- }
- else
- {
- return false;
- }
- }
- function sql_error($query_id = 0)
- {
- if(!$query_id)
- {
- $query_id = $this->query_result;
- }
- $result = @OCIError($query_id);
- return $result;
- }
-
- } // class sql_db
-
- } // if ... define
-
- ?>
\ No newline at end of file
--- 0 ----
diff -crN phpbb2013/db/postgres7.php phpbb2019/db/postgres7.php
*** phpbb2013/db/postgres7.php Sun Feb 27 20:30:44 2005
--- phpbb2019/db/postgres7.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : supportphpbb.com
*
! * $Id: postgres7.php,v 1.19 2002/03/05 02:19:38 psotfx Exp $
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : supportphpbb.com
*
! * $Id: postgres7.php,v 1.19.2.3 2005/05/06 20:50:10 acydburn Exp $
*
***************************************************************************/
diff -crN phpbb2013/groupcp.php phpbb2019/groupcp.php
*** phpbb2013/groupcp.php Sun Feb 27 20:30:46 2005
--- phpbb2019/groupcp.php Fri Dec 30 11:38:20 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: groupcp.php,v 1.58.2.22 2004/11/18 17:49:34 acydburn Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: groupcp.php,v 1.58.2.25 2005/09/17 18:36:48 grahamje Exp $
*
*
***************************************************************************/
***************
*** 99,107 ****
$yim_img = ( $row['user_yim'] ) ? '
' : '';
$yim = ( $row['user_yim'] ) ? '' . $lang['YIM'] . '' : '';
! $temp_url = append_sid("search.$phpEx?search_author=" . urlencode($username) . "&showresults=posts");
! $search_img = '
';
! $search = '' . $lang['Search_user_posts'] . '';
return;
}
--- 99,107 ----
$yim_img = ( $row['user_yim'] ) ? '
' : '';
$yim = ( $row['user_yim'] ) ? '' . $lang['YIM'] . '' : '';
! $temp_url = append_sid("search.$phpEx?search_author=" . urlencode($row['username']) . "&showresults=posts");
! $search_img = '
';
! $search = '' . sprintf($lang['Search_user_posts'], $row['username']) . '';
return;
}
***************
*** 337,343 ****
message_die(GENERAL_ERROR, 'Could not obtain moderator status', '', __LINE__, __FILE__, $sql);
}
! if ( !($row = $db->sql_fetchrow($result)) )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_level = " . USER . "
--- 337,343 ----
message_die(GENERAL_ERROR, 'Could not obtain moderator status', '', __LINE__, __FILE__, $sql);
}
! if ( !($row = $db->sql_fetchrow($result)) || $row['is_auth_mod'] == 0 )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_level = " . USER . "
***************
*** 1218,1223 ****
--- 1218,1224 ----
//
// Load and process templates
//
+ $page_title = $lang['Group_Control_Panel'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
diff -crN phpbb2013/includes/bbcode.php phpbb2019/includes/bbcode.php
*** phpbb2013/includes/bbcode.php Sun Feb 27 20:30:44 2005
--- phpbb2019/includes/bbcode.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: bbcode.php,v 1.36.2.32 2004/07/11 16:46:19 acydburn Exp $
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: bbcode.php,v 1.36.2.39 2005/12/29 15:12:20 acydburn Exp $
*
***************************************************************************/
***************
*** 124,129 ****
--- 124,131 ----
{
global $lang, $bbcode_tpl;
+ $text = preg_replace('#(script|about|applet|activex|chrome):#is', "\\1:", $text);
+
// pad it with a space so we can distinguish between FALSE and matching the 1st char (index 0).
// This is important; bbencode_quote(), bbencode_list(), and bbencode_code() all depend on it.
$text = " " . $text;
***************
*** 194,216 ****
// [img]image_url_here[/img] code..
// This one gets first-passed..
! $patterns[] = "#\[img:$uid\](.*?)\[/img:$uid\]#si";
$replacements[] = $bbcode_tpl['img'];
// matches a [url]xxxx://www.phpbb.com[/url] code..
! $patterns[] = "#\[url\]([\w]+?://[^ \"\n\r\t<]*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url1'];
// [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
! $patterns[] = "#\[url\]((www|ftp)\.[^ \"\n\r\t<]*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url2'];
// [url=xxxx://www.phpbb.com]phpBB[/url] code..
! $patterns[] = "#\[url=([\w]+?://[^ \"\n\r\t<]*?)\](.*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url3'];
// [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
! $patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\](.*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url4'];
// [email]user@domain.tld[/email] code..
--- 196,218 ----
// [img]image_url_here[/img] code..
// This one gets first-passed..
! $patterns[] = "#\[img:$uid\]([^?].*?)\[/img:$uid\]#i";
$replacements[] = $bbcode_tpl['img'];
// matches a [url]xxxx://www.phpbb.com[/url] code..
! $patterns[] = "#\[url\]([\w]+?://([\w\#$%&~/.\-;:=,?@\]+]|\[(?!url=))*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url1'];
// [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
! $patterns[] = "#\[url\]((www|ftp)\.([\w\#$%&~/.\-;:=,?@\]+]|\[(?!url=))*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url2'];
// [url=xxxx://www.phpbb.com]phpBB[/url] code..
! $patterns[] = "#\[url=([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url3'];
// [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
! $patterns[] = "#\[url=((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url4'];
// [email]user@domain.tld[/email] code..
***************
*** 250,256 ****
// [QUOTE] and [/QUOTE] for posting replies with quote, or just for quoting stuff.
$text = bbencode_first_pass_pda($text, $uid, '[quote]', '[/quote]', '', false, '');
! $text = bbencode_first_pass_pda($text, $uid, '/\[quote=(\\\".*?\\\")\]/is', '[/quote]', '', false, '', "[quote:$uid=\\1]");
// [list] and [list=x] for (un)ordered lists.
$open_tag = array();
--- 252,258 ----
// [QUOTE] and [/QUOTE] for posting replies with quote, or just for quoting stuff.
$text = bbencode_first_pass_pda($text, $uid, '[quote]', '[/quote]', '', false, '');
! $text = bbencode_first_pass_pda($text, $uid, '/\[quote=\\\\"(.*?)\\\\"\]/is', '[/quote]', '', false, '', "[quote:$uid=\\\"\\1\\\"]");
// [list] and [list=x] for (un)ordered lists.
$open_tag = array();
***************
*** 387,401 ****
//
// We're going to try and catch usernames with "[' characters.
//
! if( preg_match('#\[quote=\\\"#si', $possible_start, $match) && !preg_match('#\[quote=\\\"(.*?)\\\"\]#si', $possible_start) )
{
// OK we are in a quote tag that probably contains a ] bracket.
// Grab a bit more of the string to hopefully get all of it..
! if ($close_pos = strpos($text, '"]', $curr_pos + 9))
{
! if (strpos(substr($text, $curr_pos + 9, $close_pos - ($curr_pos + 9)), '[quote') === false)
{
! $possible_start = substr($text, $curr_pos, $close_pos - $curr_pos + 2);
}
}
}
--- 389,403 ----
//
// We're going to try and catch usernames with "[' characters.
//
! if( preg_match('#\[quote=\\\"#si', $possible_start, $match) && !preg_match('#\[quote=\\\"(.*?)\\\"\]#si', $possible_start) )
{
// OK we are in a quote tag that probably contains a ] bracket.
// Grab a bit more of the string to hopefully get all of it..
! if ($close_pos = strpos($text, '"]', $curr_pos + 14))
{
! if (strpos(substr($text, $curr_pos + 14, $close_pos - ($curr_pos + 14)), '[quote') === false)
{
! $possible_start = substr($text, $curr_pos, $close_pos - $curr_pos + 7);
}
}
}
***************
*** 430,436 ****
// We have an opening tag.
// Push its position, the text we matched, and its index in the open_tag array on to the stack, and then keep going to the right.
$match = array("pos" => $curr_pos, "tag" => $which_start_tag, "index" => $start_tag_index);
! bbcode_array_push($stack, $match);
//
// Rather than just increment $curr_pos
// Set it to the ending of the tag we just found
--- 432,438 ----
// We have an opening tag.
// Push its position, the text we matched, and its index in the open_tag array on to the stack, and then keep going to the right.
$match = array("pos" => $curr_pos, "tag" => $which_start_tag, "index" => $start_tag_index);
! array_push($stack, $match);
//
// Rather than just increment $curr_pos
// Set it to the ending of the tag we just found
***************
*** 452,458 ****
// There exists a starting tag.
$curr_nesting_depth = sizeof($stack);
// We need to do 2 replacements now.
! $match = bbcode_array_pop($stack);
$start_index = $match['pos'];
$start_tag = $match['tag'];
$start_length = strlen($start_tag);
--- 454,460 ----
// There exists a starting tag.
$curr_nesting_depth = sizeof($stack);
// We need to do 2 replacements now.
! $match = array_pop($stack);
$start_index = $match['pos'];
$start_tag = $match['tag'];
$start_length = strlen($start_tag);
***************
*** 518,524 ****
// otherwise, we go back to the start.
if (sizeof($stack) > 0)
{
! $match = bbcode_array_pop($stack);
$curr_pos = $match['pos'];
// bbcode_array_push($stack, $match);
// ++$curr_pos;
--- 520,526 ----
// otherwise, we go back to the start.
if (sizeof($stack) > 0)
{
! $match = array_pop($stack);
$curr_pos = $match['pos'];
// bbcode_array_push($stack, $match);
// ++$curr_pos;
***************
*** 614,619 ****
--- 616,622 ----
*/
function make_clickable($text)
{
+ $text = preg_replace('#(script|about|applet|activex|chrome):#is', "\\1:", $text);
// pad it with a space so we can match things at the start of the 1st line.
$ret = ' ' . $text;
***************
*** 621,633 ****
// matches an "xxxx://yyyy" URL at the start of a line, or after a space.
// xxxx can only be alpha characters.
// yyyy is anything up to the first space, newline, comma, double quote or <
! $ret = preg_replace("#(^|[\n ])([\w]+?://[^ \"\n\r\t<]*)#is", "\\1\\2", $ret);
// matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing
// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
// zzzz is optional.. will contain everything up to the first space, newline,
// comma, double quote or <.
! $ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#is", "\\1\\2", $ret);
// matches an email@domain type address at the start of a line, or after a space.
// Note: Only the followed chars are valid; alphanums, "-", "_" and or ".".
--- 624,636 ----
// matches an "xxxx://yyyy" URL at the start of a line, or after a space.
// xxxx can only be alpha characters.
// yyyy is anything up to the first space, newline, comma, double quote or <
! $ret = preg_replace("#(^|[\n ])([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1\\2", $ret);
// matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing
// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
// zzzz is optional.. will contain everything up to the first space, newline,
// comma, double quote or <.
! $ret = preg_replace("#(^|[\n ])((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1\\2", $ret);
// matches an email@domain type address at the start of a line, or after a space.
// Note: Only the followed chars are valid; alphanums, "-", "_" and or ".".
***************
*** 697,702 ****
--- 700,706 ----
* This function does exactly what the PHP4 function array_push() does
* however, to keep phpBB compatable with PHP 3 we had to come up with our own
* method of doing it.
+ * This function was deprecated in phpBB 2.0.18
*/
function bbcode_array_push(&$stack, $value)
{
***************
*** 708,713 ****
--- 712,718 ----
* This function does exactly what the PHP4 function array_pop() does
* however, to keep phpBB compatable with PHP 3 we had to come up with our own
* method of doing it.
+ * This function was deprecated in phpBB 2.0.18
*/
function bbcode_array_pop(&$stack)
{
***************
*** 758,764 ****
for ($i = 0; $i < count($smilies); $i++)
{
! $orig[] = "/(?<=.\W|\W.|^\W)" . phpbb_preg_quote($smilies[$i]['code'], "/") . "(?=.\W|\W.|\W$)/";
$repl[] = '
';
}
}
--- 763,769 ----
for ($i = 0; $i < count($smilies); $i++)
{
! $orig[] = "/(?<=.\W|\W.|^\W)" . preg_quote($smilies[$i]['code'], "/") . "(?=.\W|\W.|\W$)/";
$repl[] = '
';
}
}
diff -crN phpbb2013/includes/constants.php phpbb2019/includes/constants.php
*** phpbb2013/includes/constants.php Sun Feb 27 20:30:44 2005
--- phpbb2019/includes/constants.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : ('C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: constants.php,v 1.47.2.5 2004/11/18 17:49:42 acydburn Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : ('C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: constants.php,v 1.47.2.6 2005/10/30 15:17:14 acydburn Exp $
*
*
***************************************************************************/
***************
*** 167,172 ****
--- 167,173 ----
define('SEARCH_WORD_TABLE', $table_prefix.'search_wordlist');
define('SEARCH_MATCH_TABLE', $table_prefix.'search_wordmatch');
define('SESSIONS_TABLE', $table_prefix.'sessions');
+ define('SESSIONS_KEYS_TABLE', $table_prefix.'sessions_keys');
define('SMILIES_TABLE', $table_prefix.'smilies');
define('THEMES_TABLE', $table_prefix.'themes');
define('THEMES_NAME_TABLE', $table_prefix.'themes_name');
diff -crN phpbb2013/includes/db.php phpbb2019/includes/db.php
*** phpbb2013/includes/db.php Sun Feb 27 20:30:44 2005
--- phpbb2019/includes/db.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: db.php,v 1.10 2002/03/18 13:35:22 psotfx Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: db.php,v 1.10.2.3 2005/10/30 15:17:14 acydburn Exp $
*
*
***************************************************************************/
***************
*** 60,66 ****
$db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, false);
if(!$db->db_connect_id)
{
! message_die(CRITICAL_ERROR, "Could not connect to the database");
}
?>
\ No newline at end of file
--- 60,66 ----
$db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, false);
if(!$db->db_connect_id)
{
! message_die(CRITICAL_ERROR, "Could not connect to the database");
}
?>
\ No newline at end of file
diff -crN phpbb2013/includes/emailer.php phpbb2019/includes/emailer.php
*** phpbb2013/includes/emailer.php Sun Feb 27 20:30:44 2005
--- phpbb2019/includes/emailer.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
copyright : (C) 2001 The phpBB Group
email : support@phpbb.com
! $Id: emailer.php,v 1.15.2.34 2003/07/26 11:41:35 acydburn Exp $
***************************************************************************/
--- 6,12 ----
copyright : (C) 2001 The phpBB Group
email : support@phpbb.com
! $Id: emailer.php,v 1.15.2.35 2005/10/05 17:42:04 grahamje Exp $
***************************************************************************/
***************
*** 164,170 ****
if (preg_match('#^(Subject:(.*?))$#m', $this->msg, $match))
{
$this->subject = (trim($match[2]) != '') ? trim($match[2]) : (($this->subject != '') ? $this->subject : 'No Subject');
! $drop_header .= '[\r\n]*?' . phpbb_preg_quote($match[1], '#');
}
else
{
--- 164,170 ----
if (preg_match('#^(Subject:(.*?))$#m', $this->msg, $match))
{
$this->subject = (trim($match[2]) != '') ? trim($match[2]) : (($this->subject != '') ? $this->subject : 'No Subject');
! $drop_header .= '[\r\n]*?' . preg_quote($match[1], '#');
}
else
{
***************
*** 174,180 ****
if (preg_match('#^(Charset:(.*?))$#m', $this->msg, $match))
{
$this->encoding = (trim($match[2]) != '') ? trim($match[2]) : trim($lang['ENCODING']);
! $drop_header .= '[\r\n]*?' . phpbb_preg_quote($match[1], '#');
}
else
{
--- 174,180 ----
if (preg_match('#^(Charset:(.*?))$#m', $this->msg, $match))
{
$this->encoding = (trim($match[2]) != '') ? trim($match[2]) : trim($lang['ENCODING']);
! $drop_header .= '[\r\n]*?' . preg_quote($match[1], '#');
}
else
{
***************
*** 261,267 ****
$str = chunk_split(base64_encode($str), $length, $spacer);
// remove trailing spacer and add start and end delimiters
! $str = preg_replace('#' . phpbb_preg_quote($spacer, '#') . '$#', '', $str);
return $start . $str . $end;
}
--- 261,267 ----
$str = chunk_split(base64_encode($str), $length, $spacer);
// remove trailing spacer and add start and end delimiters
! $str = preg_replace('#' . preg_quote($spacer, '#') . '$#', '', $str);
return $start . $str . $end;
}
diff -crN phpbb2013/includes/functions.php phpbb2019/includes/functions.php
*** phpbb2013/includes/functions.php Sun Feb 27 20:30:44 2005
--- phpbb2019/includes/functions.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: functions.php,v 1.133.2.34 2005/02/21 18:37:33 acydburn Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: functions.php,v 1.133.2.38 2005/12/19 18:01:36 acydburn Exp $
*
*
***************************************************************************/
***************
*** 78,89 ****
function phpbb_clean_username($username)
{
$username = substr(htmlspecialchars(str_replace("\'", "'", trim($username))), 0, 25);
! $username = phpbb_rtrim($username, "\\");
$username = str_replace("'", "\'", $username);
return $username;
}
// added at phpBB 2.0.12 to fix a bug in PHP 4.3.10 (only supporting charlist in php >= 4.1.0)
function phpbb_rtrim($str, $charlist = false)
{
--- 78,118 ----
function phpbb_clean_username($username)
{
$username = substr(htmlspecialchars(str_replace("\'", "'", trim($username))), 0, 25);
! $username = phpbb_rtrim($username, "\\");
$username = str_replace("'", "\'", $username);
return $username;
}
+ /**
+ * This function is a wrapper for ltrim, as charlist is only supported in php >= 4.1.0
+ * Added in phpBB 2.0.18
+ */
+ function phpbb_ltrim($str, $charlist = false)
+ {
+ if ($charlist === false)
+ {
+ return ltrim($str);
+ }
+
+ $php_version = explode('.', PHP_VERSION);
+
+ // php version < 4.1.0
+ if ((int) $php_version[0] < 4 || ((int) $php_version[0] == 4 && (int) $php_version[1] < 1))
+ {
+ while ($str{0} == $charlist)
+ {
+ $str = substr($str, 1);
+ }
+ }
+ else
+ {
+ $str = ltrim($str, $charlist);
+ }
+
+ return $str;
+ }
+
// added at phpBB 2.0.12 to fix a bug in PHP 4.3.10 (only supporting charlist in php >= 4.1.0)
function phpbb_rtrim($str, $charlist = false)
{
***************
*** 117,123 ****
{
global $db;
! if (intval($user) == 0 || $force_str)
{
$user = phpbb_clean_username($user);
}
--- 146,152 ----
{
global $db;
! if (!is_numeric($user) || $force_str)
{
$user = phpbb_clean_username($user);
}
***************
*** 129,135 ****
$sql = "SELECT *
FROM " . USERS_TABLE . "
WHERE ";
! $sql .= ( ( is_integer($user) ) ? "user_id = $user" : "username = '" . $user . "'" ) . " AND user_id <> " . ANONYMOUS;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Tried obtaining data for a non-existent user', '', __LINE__, __FILE__, $sql);
--- 158,164 ----
$sql = "SELECT *
FROM " . USERS_TABLE . "
WHERE ";
! $sql .= ( ( is_integer($user) ) ? "user_id = $user" : "username = '" . str_replace("\'", "''", $user) . "'" ) . " AND user_id <> " . ANONYMOUS;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Tried obtaining data for a non-existent user', '', __LINE__, __FILE__, $sql);
***************
*** 539,545 ****
{
do
{
! $orig_word[] = '#\b(' . str_replace('\*', '\w*?', phpbb_preg_quote($row['word'], '#')) . ')\b#i';
$replacement_word[] = $row['replacement'];
}
while ( $row = $db->sql_fetchrow($result) );
--- 568,574 ----
{
do
{
! $orig_word[] = '#\b(' . str_replace('\*', '\w*?', preg_quote($row['word'], '#')) . ')\b#i';
$replacement_word[] = $row['replacement'];
}
while ( $row = $db->sql_fetchrow($result) );
***************
*** 578,584 ****
die("message_die() was called multiple times. This isn't supposed to happen. Was message_die() used in page_tail.php?");
}
! define(HAS_DIED, 1);
$sql_store = $sql;
--- 607,613 ----
die("message_die() was called multiple times. This isn't supposed to happen. Was message_die() used in page_tail.php?");
}
! define('HAS_DIED', 1);
$sql_store = $sql;
diff -crN phpbb2013/includes/functions_admin.php phpbb2019/includes/functions_admin.php
*** phpbb2013/includes/functions_admin.php Sun Feb 27 20:30:44 2005
--- phpbb2019/includes/functions_admin.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: functions_admin.php,v 1.5.2.3 2002/07/19 17:03:47 psotfx Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: functions_admin.php,v 1.5.2.5 2005/09/14 19:16:21 acydburn Exp $
*
*
***************************************************************************/
***************
*** 30,38 ****
$is_auth_ary = auth(AUTH_READ, AUTH_LIST_ALL, $userdata);
! $sql = "SELECT forum_id, forum_name
! FROM " . FORUMS_TABLE . "
! ORDER BY cat_id, forum_order";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Couldn not obtain forums information', '', __LINE__, __FILE__, $sql);
--- 30,39 ----
$is_auth_ary = auth(AUTH_READ, AUTH_LIST_ALL, $userdata);
! $sql = 'SELECT f.forum_id, f.forum_name
! FROM ' . CATEGORIES_TABLE . ' c, ' . FORUMS_TABLE . ' f
! WHERE f.cat_id = c.cat_id
! ORDER BY c.cat_order, f.forum_order';
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Couldn not obtain forums information', '', __LINE__, __FILE__, $sql);
***************
*** 140,149 ****
if ( $row = $db->sql_fetchrow($result) )
{
! $sql = ( $row['total_posts'] ) ? "UPDATE " . TOPICS_TABLE . " SET topic_replies = " . ( $row['total_posts'] - 1 ) . ", topic_first_post_id = " . $row['first_post'] . ", topic_last_post_id = " . $row['last_post'] . " WHERE topic_id = $id" : "DELETE FROM " . TOPICS_TABLE . " WHERE topic_id = $id";
! if ( !$db->sql_query($sql) )
{
! message_die(GENERAL_ERROR, 'Could not update topic', '', __LINE__, __FILE__, $sql);
}
}
break;
--- 141,185 ----
if ( $row = $db->sql_fetchrow($result) )
{
! if ($row['total_posts'])
{
! // Correct the details of this topic
! $sql = 'UPDATE ' . TOPICS_TABLE . '
! SET topic_replies = ' . ($row['total_posts'] - 1) . ', topic_first_post_id = ' . $row['first_post'] . ', topic_last_post_id = ' . $row['last_post'] . "
! WHERE topic_id = $id";
!
! if (!$db->sql_query($sql))
! {
! message_die(GENERAL_ERROR, 'Could not update topic', '', __LINE__, __FILE__, $sql);
! }
! }
! else
! {
! // There are no replies to this topic
! // Check if it is a move stub
! $sql = 'SELECT topic_moved_id
! FROM ' . TOPICS_TABLE . "
! WHERE topic_id = $id";
!
! if (!($result = $db->sql_query($sql)))
! {
! message_die(GENERAL_ERROR, 'Could not get topic ID', '', __LINE__, __FILE__, $sql);
! }
!
! if ($row = $db->sql_fetchrow($result))
! {
! if (!$row['topic_moved_id'])
! {
! $sql = 'DELETE FROM ' . TOPICS_TABLE . " WHERE topic_id = $id";
!
! if (!$db->sql_query($sql))
! {
! message_die(GENERAL_ERROR, 'Could not remove topic', '', __LINE__, __FILE__, $sql);
! }
! }
! }
!
! $db->sql_freeresult($result);
}
}
break;
diff -crN phpbb2013/includes/functions_post.php phpbb2019/includes/functions_post.php
*** phpbb2013/includes/functions_post.php Sun Feb 27 20:30:44 2005
--- phpbb2019/includes/functions_post.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: functions_post.php,v 1.9.2.37 2004/11/18 17:49:44 acydburn Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: functions_post.php,v 1.9.2.40 2005/12/22 11:34:02 acydburn Exp $
*
*
***************************************************************************/
***************
*** 25,32 ****
die('Hacking attempt');
}
! $html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#');
! $html_entities_replace = array('&', '<', '>');
$unhtml_specialchars_match = array('#>#', '#<#', '#"#', '#&#');
$unhtml_specialchars_replace = array('>', '<', '"', '&');
--- 25,32 ----
die('Hacking attempt');
}
! $html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#', '#"#');
! $html_entities_replace = array('&', '<', '>', '"');
$unhtml_specialchars_match = array('#>#', '#<#', '#"#', '#&#');
$unhtml_specialchars_replace = array('>', '<', '"', '&');
***************
*** 213,219 ****
//
// Post a new topic/reply/poll or edit existing post/poll
//
! function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, &$bbcode_on, &$html_on, &$smilies_on, &$attach_sig, &$bbcode_uid, &$post_username, &$post_subject, &$post_message, &$poll_title, &$poll_options, &$poll_length)
{
global $board_config, $lang, $db, $phpbb_root_path, $phpEx;
global $userdata, $user_ip;
--- 213,219 ----
//
// Post a new topic/reply/poll or edit existing post/poll
//
! function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, &$bbcode_on, &$html_on, &$smilies_on, &$attach_sig, &$bbcode_uid, $post_username, $post_subject, $post_message, $poll_title, &$poll_options, &$poll_length)
{
global $board_config, $lang, $db, $phpbb_root_path, $phpEx;
global $userdata, $user_ip;
***************
*** 578,593 ****
$current_time = time();
! if ($mode == 'delete')
! {
! $delete_sql = (!$post_data['first_post'] && !$post_data['last_post']) ? " AND user_id = " . $userdata['user_id'] : '';
! $sql = "DELETE FROM " . TOPICS_WATCH_TABLE . " WHERE topic_id = $topic_id" . $delete_sql;
! if (!$db->sql_query($sql))
! {
! message_die(GENERAL_ERROR, 'Could not change topic notify data', '', __LINE__, __FILE__, $sql);
! }
! }
! else
{
if ($mode == 'reply')
{
--- 578,584 ----
$current_time = time();
! if ($mode != 'delete')
{
if ($mode == 'reply')
{
***************
*** 769,775 ****
$gen_simple_header = TRUE;
! $page_title = $lang['Emoticons'] . " - $topic_title";
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
--- 760,766 ----
$gen_simple_header = TRUE;
! $page_title = $lang['Emoticons'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
diff -crN phpbb2013/includes/functions_search.php phpbb2019/includes/functions_search.php
*** phpbb2013/includes/functions_search.php Sun Feb 27 20:30:44 2005
--- phpbb2019/includes/functions_search.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2002 The phpBB Group
* email : support@phpbb.com
*
! * $Id: functions_search.php,v 1.8.2.19 2004/11/18 17:49:45 acydburn Exp $
*
****************************************************************************/
--- 6,12 ----
* copyright : (C) 2002 The phpBB Group
* email : support@phpbb.com
*
! * $Id: functions_search.php,v 1.8.2.20 2005/09/14 18:14:30 acydburn Exp $
*
****************************************************************************/
***************
*** 89,95 ****
return $entry;
}
! function split_words(&$entry, $mode = 'post')
{
// If you experience problems with the new method, uncomment this block.
/*
--- 89,95 ----
return $entry;
}
! function split_words($entry, $mode = 'post')
{
// If you experience problems with the new method, uncomment this block.
/*
diff -crN phpbb2013/includes/functions_selects.php phpbb2019/includes/functions_selects.php
*** phpbb2013/includes/functions_selects.php Sun Feb 27 20:30:44 2005
--- phpbb2019/includes/functions_selects.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: functions_selects.php,v 1.3.2.4 2002/12/22 12:20:35 psotfx Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: functions_selects.php,v 1.3.2.5 2005/05/06 20:50:11 acydburn Exp $
*
*
***************************************************************************/
***************
*** 108,111 ****
return $tz_select;
}
! ?>
--- 108,111 ----
return $tz_select;
}
! ?>
\ No newline at end of file
diff -crN phpbb2013/includes/functions_validate.php phpbb2019/includes/functions_validate.php
*** phpbb2013/includes/functions_validate.php Sun Feb 27 20:30:44 2005
--- phpbb2019/includes/functions_validate.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: functions_validate.php,v 1.6.2.12 2003/06/09 19:13:05 psotfx Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: functions_validate.php,v 1.6.2.15 2005/10/30 15:17:14 acydburn Exp $
*
*
***************************************************************************/
***************
*** 30,46 ****
global $db, $lang, $userdata;
// Remove doubled up spaces
! $username = preg_replace('#\s+#', ' ', $username);
! // Limit username length
! $username = substr(str_replace("\'", "'", $username), 0, 25);
! $username = str_replace("'", "''", $username);
$sql = "SELECT username
! FROM " . USERS_TABLE . "
WHERE LOWER(username) = '" . strtolower($username) . "'";
if ($result = $db->sql_query($sql))
{
! if ($row = $db->sql_fetchrow($result))
{
if (($userdata['session_logged_in'] && $row['username'] != $userdata['username']) || !$userdata['session_logged_in'])
{
--- 30,44 ----
global $db, $lang, $userdata;
// Remove doubled up spaces
! $username = preg_replace('#\s+#', ' ', trim($username));
! $username = phpbb_clean_username($username);
$sql = "SELECT username
! FROM " . USERS_TABLE . "
WHERE LOWER(username) = '" . strtolower($username) . "'";
if ($result = $db->sql_query($sql))
{
! while ($row = $db->sql_fetchrow($result))
{
if (($userdata['session_logged_in'] && $row['username'] != $userdata['username']) || !$userdata['session_logged_in'])
{
***************
*** 72,78 ****
{
do
{
! if (preg_match("#\b(" . str_replace("\*", ".*?", phpbb_preg_quote($row['disallow_username'], '#')) . ")\b#i", $username))
{
$db->sql_freeresult($result);
return array('error' => true, 'error_msg' => $lang['Username_disallowed']);
--- 70,76 ----
{
do
{
! if (preg_match("#\b(" . str_replace("\*", ".*?", preg_quote($row['disallow_username'], '#')) . ")\b#i", $username))
{
$db->sql_freeresult($result);
return array('error' => true, 'error_msg' => $lang['Username_disallowed']);
***************
*** 91,97 ****
{
do
{
! if (preg_match("#\b(" . str_replace("\*", ".*?", phpbb_preg_quote($row['word'], '#')) . ")\b#i", $username))
{
$db->sql_freeresult($result);
return array('error' => true, 'error_msg' => $lang['Username_disallowed']);
--- 89,95 ----
{
do
{
! if (preg_match("#\b(" . str_replace("\*", ".*?", preg_quote($row['word'], '#')) . ")\b#i", $username))
{
$db->sql_freeresult($result);
return array('error' => true, 'error_msg' => $lang['Username_disallowed']);
diff -crN phpbb2013/includes/page_header.php phpbb2019/includes/page_header.php
*** phpbb2013/includes/page_header.php Sun Feb 27 20:30:44 2005
--- phpbb2019/includes/page_header.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: page_header.php,v 1.106.2.23 2004/07/11 16:46:19 acydburn Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: page_header.php,v 1.106.2.25 2005/10/30 15:17:14 acydburn Exp $
*
*
***************************************************************************/
***************
*** 35,41 ****
{
$phpver = phpversion();
! $useragent = (isset($_SERVER["HTTP_USER_AGENT"]) ) ? $_SERVER["HTTP_USER_AGENT"] : $HTTP_USER_AGENT;
if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) )
{
--- 35,41 ----
{
$phpver = phpversion();
! $useragent = (isset($HTTP_SERVER_VARS['HTTP_USER_AGENT'])) ? $HTTP_SERVER_VARS['HTTP_USER_AGENT'] : getenv('HTTP_USER_AGENT');
if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) )
{
***************
*** 450,455 ****
--- 450,463 ----
if ( !$userdata['session_logged_in'] )
{
$template->assign_block_vars('switch_user_logged_out', array());
+ //
+ // Allow autologin?
+ //
+ if (!isset($board_config['allow_autologin']) || $board_config['allow_autologin'] )
+ {
+ $template->assign_block_vars('switch_allow_autologin', array());
+ $template->assign_block_vars('switch_user_logged_out.switch_allow_autologin', array());
+ }
}
else
{
***************
*** 466,472 ****
// Work around for "current" Apache 2 + PHP module which seems to not
// cope with private cache control setting
! if (!empty($_SERVER['SERVER_SOFTWARE']) && strstr($_SERVER['SERVER_SOFTWARE'], 'Apache/2'))
{
header ('Cache-Control: no-cache, pre-check=0, post-check=0');
}
--- 474,480 ----
// Work around for "current" Apache 2 + PHP module which seems to not
// cope with private cache control setting
! if (!empty($HTTP_SERVER_VARS['SERVER_SOFTWARE']) && strstr($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'Apache/2'))
{
header ('Cache-Control: no-cache, pre-check=0, post-check=0');
}
diff -crN phpbb2013/includes/page_tail.php phpbb2019/includes/page_tail.php
*** phpbb2013/includes/page_tail.php Sun Feb 27 20:30:44 2005
--- phpbb2019/includes/page_tail.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: page_tail.php,v 1.27.2.3 2004/12/22 02:04:00 psotfx Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: page_tail.php,v 1.27.2.4 2005/09/14 18:14:30 acydburn Exp $
*
*
***************************************************************************/
***************
*** 25,30 ****
--- 25,32 ----
die('Hacking attempt');
}
+ global $do_gzip_compress;
+
//
// Show the overall footer.
//
***************
*** 35,41 ****
);
$template->assign_vars(array(
! 'TRANSLATION_INFO' => ( isset($lang['TRANSLATION_INFO']) ) ? $lang['TRANSLATION_INFO'] : '',
'ADMIN_LINK' => $admin_link)
);
--- 37,43 ----
);
$template->assign_vars(array(
! 'TRANSLATION_INFO' => (isset($lang['TRANSLATION_INFO'])) ? $lang['TRANSLATION_INFO'] : ((isset($lang['TRANSLATION'])) ? $lang['TRANSLATION'] : ''),
'ADMIN_LINK' => $admin_link)
);
diff -crN phpbb2013/includes/sessions.php phpbb2019/includes/sessions.php
*** phpbb2013/includes/sessions.php Sun Feb 27 20:30:44 2005
--- phpbb2019/includes/sessions.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: sessions.php,v 1.58.2.12 2005/02/27 20:33:01 acydburn Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: sessions.php,v 1.58.2.16 2005/10/30 15:17:14 acydburn Exp $
*
*
***************************************************************************/
***************
*** 24,30 ****
// Adds/updates a new session to the database for the given userid.
// Returns the new session ID on success.
//
! function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_autologin = 0)
{
global $db, $board_config;
global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;
--- 24,30 ----
// Adds/updates a new session to the database for the given userid.
// Returns the new session ID on success.
//
! function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_autologin = 0, $admin = 0)
{
global $db, $board_config;
global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;
***************
*** 53,117 ****
$session_id = '';
}
$last_visit = 0;
$current_time = time();
- $expiry_time = $current_time - $board_config['session_length'];
//
! // Try and pull the last time stored in a cookie, if it exists
//
! $sql = "SELECT *
! FROM " . USERS_TABLE . "
! WHERE user_id = $user_id";
! if ( !($result = $db->sql_query($sql)) )
{
! message_die(CRITICAL_ERROR, 'Could not obtain lastvisit data from user table', '', __LINE__, __FILE__, $sql);
}
! $userdata = $db->sql_fetchrow($result);
! if ( $user_id != ANONYMOUS )
{
! $auto_login_key = $userdata['user_password'];
!
! if ( $auto_create )
{
! if ( isset($sessiondata['autologinid']) && $userdata['user_active'] )
! {
! // We have to login automagically
! if( $sessiondata['autologinid'] === $auto_login_key )
! {
! // autologinid matches password
! $login = 1;
! $enable_autologin = 1;
! }
! else
! {
! // No match; don't login, set as anonymous user
! $login = 0;
! $enable_autologin = 0;
! $user_id = $userdata['user_id'] = ANONYMOUS;
! }
! }
! else
{
! // Autologin is not set. Don't login, set as anonymous user
! $login = 0;
! $enable_autologin = 0;
! $user_id = $userdata['user_id'] = ANONYMOUS;
}
}
! else
{
$login = 1;
}
}
! else
! {
! $login = 0;
! $enable_autologin = 0;
}
//
// Initial ban check against user id, IP and email address
//
--- 53,146 ----
$session_id = '';
}
+ $page_id = (int) $page_id;
+
$last_visit = 0;
$current_time = time();
//
! // Are auto-logins allowed?
! // If allow_autologin is not set or is true then they are
! // (same behaviour as old 2.0.x session code)
//
! if (isset($board_config['allow_autologin']) && !$board_config['allow_autologin'])
{
! $enable_autologin = $sessiondata['autologinid'] = false;
}
! //
! // First off attempt to join with the autologin value if we have one
! // If not, just use the user_id value
! //
! $userdata = array();
! if ($user_id != ANONYMOUS)
{
! if (isset($sessiondata['autologinid']) && (string) $sessiondata['autologinid'] != '' && $user_id)
{
! $sql = 'SELECT u.*
! FROM ' . USERS_TABLE . ' u, ' . SESSIONS_KEYS_TABLE . ' k
! WHERE u.user_id = ' . (int) $user_id . "
! AND u.user_active = 1
! AND k.user_id = u.user_id
! AND k.key_id = '" . md5($sessiondata['autologinid']) . "'";
! if (!($result = $db->sql_query($sql)))
{
! message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);
}
+
+ $userdata = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $enable_autologin = $login = 1;
}
! else if (!$auto_create)
{
+ $sessiondata['autologinid'] = '';
+ $sessiondata['userid'] = $user_id;
+
+ $sql = 'SELECT *
+ FROM ' . USERS_TABLE . '
+ WHERE user_id = ' . (int) $user_id . '
+ AND user_active = 1';
+ if (!($result = $db->sql_query($sql)))
+ {
+ message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);
+ }
+
+ $userdata = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
$login = 1;
}
}
!
! //
! // At this point either $userdata should be populated or
! // one of the below is true
! // * Key didn't match one in the DB
! // * User does not exist
! // * User is inactive
! //
! if (!sizeof($userdata) || !is_array($userdata) || !$userdata)
! {
! $sessiondata['autologinid'] = '';
! $sessiondata['userid'] = $user_id = ANONYMOUS;
! $enable_autologin = $login = 0;
!
! $sql = 'SELECT *
! FROM ' . USERS_TABLE . '
! WHERE user_id = ' . (int) $user_id;
! if (!($result = $db->sql_query($sql)))
! {
! message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);
! }
!
! $userdata = $db->sql_fetchrow($result);
! $db->sql_freeresult($result);
}
+
//
// Initial ban check against user id, IP and email address
//
***************
*** 143,158 ****
// Create or update the session
//
$sql = "UPDATE " . SESSIONS_TABLE . "
! SET session_user_id = $user_id, session_start = $current_time, session_time = $current_time, session_page = $page_id, session_logged_in = $login
WHERE session_id = '" . $session_id . "'
AND session_ip = '$user_ip'";
if ( !$db->sql_query($sql) || !$db->sql_affectedrows() )
{
! $session_id = md5(uniqid($user_ip));
$sql = "INSERT INTO " . SESSIONS_TABLE . "
! (session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in)
! VALUES ('$session_id', $user_id, $current_time, $current_time, '$user_ip', $page_id, $login)";
if ( !$db->sql_query($sql) )
{
message_die(CRITICAL_ERROR, 'Error creating new session', '', __LINE__, __FILE__, $sql);
--- 172,189 ----
// Create or update the session
//
$sql = "UPDATE " . SESSIONS_TABLE . "
! SET session_user_id = $user_id, session_start = $current_time, session_time = $current_time, session_page = $page_id, session_logged_in = $login, session_admin = $admin
WHERE session_id = '" . $session_id . "'
AND session_ip = '$user_ip'";
if ( !$db->sql_query($sql) || !$db->sql_affectedrows() )
{
! list($sec, $usec) = explode(' ', microtime());
! mt_srand((float) $sec + ((float) $usec * 100000));
! $session_id = md5(uniqid(mt_rand(), true));
$sql = "INSERT INTO " . SESSIONS_TABLE . "
! (session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in, session_admin)
! VALUES ('$session_id', $user_id, $current_time, $current_time, '$user_ip', $page_id, $login, $admin)";
if ( !$db->sql_query($sql) )
{
message_die(CRITICAL_ERROR, 'Error creating new session', '', __LINE__, __FILE__, $sql);
***************
*** 160,179 ****
}
if ( $user_id != ANONYMOUS )
! {// ( $userdata['user_session_time'] > $expiry_time && $auto_create ) ? $userdata['user_lastvisit'] : (
$last_visit = ( $userdata['user_session_time'] > 0 ) ? $userdata['user_session_time'] : $current_time;
! $sql = "UPDATE " . USERS_TABLE . "
! SET user_session_time = $current_time, user_session_page = $page_id, user_lastvisit = $last_visit
! WHERE user_id = $user_id";
! if ( !$db->sql_query($sql) )
{
! message_die(CRITICAL_ERROR, 'Error updating last visit time', '', __LINE__, __FILE__, $sql);
}
$userdata['user_lastvisit'] = $last_visit;
! $sessiondata['autologinid'] = ( $enable_autologin && $sessionmethod == SESSION_METHOD_COOKIE ) ? $auto_login_key : '';
$sessiondata['userid'] = $user_id;
}
--- 191,247 ----
}
if ( $user_id != ANONYMOUS )
! {
$last_visit = ( $userdata['user_session_time'] > 0 ) ? $userdata['user_session_time'] : $current_time;
! if (!$admin)
{
! $sql = "UPDATE " . USERS_TABLE . "
! SET user_session_time = $current_time, user_session_page = $page_id, user_lastvisit = $last_visit
! WHERE user_id = $user_id";
! if ( !$db->sql_query($sql) )
! {
! message_die(CRITICAL_ERROR, 'Error updating last visit time', '', __LINE__, __FILE__, $sql);
! }
}
$userdata['user_lastvisit'] = $last_visit;
! //
! // Regenerate the auto-login key
! //
! if ($enable_autologin)
! {
! list($sec, $usec) = explode(' ', microtime());
! mt_srand(hexdec(substr($session_id, 0, 8)) + (float) $sec + ((float) $usec * 1000000));
! $auto_login_key = uniqid(mt_rand(), true);
!
! if (isset($sessiondata['autologinid']) && (string) $sessiondata['autologinid'] != '')
! {
! $sql = 'UPDATE ' . SESSIONS_KEYS_TABLE . "
! SET last_ip = '$user_ip', key_id = '" . md5($auto_login_key) . "', last_login = $current_time
! WHERE key_id = '" . md5($sessiondata['autologinid']) . "'";
! }
! else
! {
! $sql = 'INSERT INTO ' . SESSIONS_KEYS_TABLE . "(key_id, user_id, last_ip, last_login)
! VALUES ('" . md5($auto_login_key) . "', $user_id, '$user_ip', $current_time)";
! }
!
! if ( !$db->sql_query($sql) )
! {
! message_die(CRITICAL_ERROR, 'Error updating session key', '', __LINE__, __FILE__, $sql);
! }
!
! $sessiondata['autologinid'] = $auto_login_key;
! unset($auto_login_key);
! }
! else
! {
! $sessiondata['autologinid'] = '';
! }
!
! // $sessiondata['autologinid'] = (!$admin) ? (( $enable_autologin && $sessionmethod == SESSION_METHOD_COOKIE ) ? $auto_login_key : '') : $sessiondata['autologinid'];
$sessiondata['userid'] = $user_id;
}
***************
*** 184,189 ****
--- 252,259 ----
$userdata['session_page'] = $page_id;
$userdata['session_start'] = $current_time;
$userdata['session_time'] = $current_time;
+ $userdata['session_admin'] = $admin;
+ $userdata['session_key'] = $sessiondata['autologinid'];
setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);
setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);
***************
*** 229,234 ****
--- 299,306 ----
$session_id = '';
}
+ $thispage_id = (int) $thispage_id;
+
//
// Does a session exist?
//
***************
*** 271,278 ****
//
if ( $current_time - $userdata['session_time'] > 60 )
{
$sql = "UPDATE " . SESSIONS_TABLE . "
! SET session_time = $current_time, session_page = $thispage_id
WHERE session_id = '" . $userdata['session_id'] . "'";
if ( !$db->sql_query($sql) )
{
--- 343,353 ----
//
if ( $current_time - $userdata['session_time'] > 60 )
{
+ // A little trick to reset session_admin on session re-usage
+ $update_admin = (!defined('IN_ADMIN') && $current_time - $userdata['session_time'] > ($board_config['session_length']+60)) ? ', session_admin = 0' : '';
+
$sql = "UPDATE " . SESSIONS_TABLE . "
! SET session_time = $current_time, session_page = $thispage_id$update_admin
WHERE session_id = '" . $userdata['session_id'] . "'";
if ( !$db->sql_query($sql) )
{
***************
*** 282,288 ****
if ( $userdata['user_id'] != ANONYMOUS )
{
$sql = "UPDATE " . USERS_TABLE . "
! SET user_session_time = $current_time, user_session_page = $thispage_id
WHERE user_id = " . $userdata['user_id'];
if ( !$db->sql_query($sql) )
{
--- 357,363 ----
if ( $userdata['user_id'] != ANONYMOUS )
{
$sql = "UPDATE " . USERS_TABLE . "
! SET user_session_time = $current_time, user_session_page = $thispage_id
WHERE user_id = " . $userdata['user_id'];
if ( !$db->sql_query($sql) )
{
***************
*** 290,306 ****
}
}
! //
! // Delete expired sessions
! //
! $expiry_time = $current_time - $board_config['session_length'];
! $sql = "DELETE FROM " . SESSIONS_TABLE . "
! WHERE session_time < $expiry_time
! AND session_id <> '$session_id'";
! if ( !$db->sql_query($sql) )
! {
! message_die(CRITICAL_ERROR, 'Error clearing sessions table', '', __LINE__, __FILE__, $sql);
! }
setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);
setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);
--- 365,371 ----
}
}
! session_clean($userdata['session_id']);
setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);
setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);
***************
*** 326,339 ****
}
! //
! // session_end closes out a session
! // deleting the corresponding entry
! // in the sessions table
! //
function session_end($session_id, $user_id)
{
! global $db, $lang, $board_config;
global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;
$cookiename = $board_config['cookie_name'];
--- 391,404 ----
}
! /**
! * Terminates the specified session
! * It will delete the entry in the sessions table for this session,
! * remove the corresponding auto-login key and reset the cookies
! */
function session_end($session_id, $user_id)
{
! global $db, $lang, $board_config, $userdata;
global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;
$cookiename = $board_config['cookie_name'];
***************
*** 343,362 ****
$current_time = time();
- //
- // Pull cookiedata or grab the URI propagated sid
- //
- if ( isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) )
- {
- $session_id = isset( $HTTP_COOKIE_VARS[$cookiename . '_sid'] ) ? $HTTP_COOKIE_VARS[$cookiename . '_sid'] : '';
- $sessionmethod = SESSION_METHOD_COOKIE;
- }
- else
- {
- $session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';
- $sessionmethod = SESSION_METHOD_GET;
- }
-
if (!preg_match('/^[A-Za-z0-9]*$/', $session_id))
{
return;
--- 408,413 ----
***************
*** 365,371 ****
//
// Delete existing session
//
! $sql = "DELETE FROM " . SESSIONS_TABLE . "
WHERE session_id = '$session_id'
AND session_user_id = $user_id";
if ( !$db->sql_query($sql) )
--- 416,422 ----
//
// Delete existing session
//
! $sql = 'DELETE FROM ' . SESSIONS_TABLE . "
WHERE session_id = '$session_id'
AND session_user_id = $user_id";
if ( !$db->sql_query($sql) )
***************
*** 373,384 ****
--- 424,501 ----
message_die(CRITICAL_ERROR, 'Error removing user session', '', __LINE__, __FILE__, $sql);
}
+ //
+ // Remove this auto-login entry (if applicable)
+ //
+ if ( isset($userdata['session_key']) && $userdata['session_key'] != '' )
+ {
+ $autologin_key = md5($userdata['session_key']);
+ $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '
+ WHERE user_id = ' . (int) $user_id . "
+ AND key_id = '$autologin_key'";
+ if ( !$db->sql_query($sql) )
+ {
+ message_die(CRITICAL_ERROR, 'Error removing auto-login key', '', __LINE__, __FILE__, $sql);
+ }
+ }
+
+ //
+ // We expect that message_die will be called after this function,
+ // but just in case it isn't, reset $userdata to the details for a guest
+ //
+ $sql = 'SELECT *
+ FROM ' . USERS_TABLE . '
+ WHERE user_id = ' . ANONYMOUS;
+ if ( !($result = $db->sql_query($sql)) )
+ {
+ message_die(CRITICAL_ERROR, 'Error obtaining user details', '', __LINE__, __FILE__, $sql);
+ }
+ if ( !($userdata = $db->sql_fetchrow($result)) )
+ {
+ message_die(CRITICAL_ERROR, 'Error obtaining user details', '', __LINE__, __FILE__, $sql);
+ }
+ $db->sql_freeresult($result);
+
+
setcookie($cookiename . '_data', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure);
setcookie($cookiename . '_sid', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure);
return true;
}
+ /**
+ * Removes expired sessions and auto-login keys from the database
+ */
+ function session_clean($session_id)
+ {
+ global $board_config, $db;
+
+ //
+ // Delete expired sessions
+ //
+ $sql = 'DELETE FROM ' . SESSIONS_TABLE . '
+ WHERE session_time < ' . (time() - (int) $board_config['session_length']) . "
+ AND session_id <> '$session_id'";
+ if ( !$db->sql_query($sql) )
+ {
+ message_die(CRITICAL_ERROR, 'Error clearing sessions table', '', __LINE__, __FILE__, $sql);
+ }
+
+ //
+ // Delete expired auto-login keys
+ // If max_autologin_time is not set then keys will never be deleted
+ // (same behaviour as old 2.0.x session code)
+ //
+ if (!empty($board_config['max_autologin_time']) && $board_config['max_autologin_time'] > 0)
+ {
+ $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '
+ WHERE last_login < ' . (time() - (86400 * (int) $board_config['max_autologin_time']));
+ $db->sql_query($sql);
+ }
+
+ return true;
+ }
+
//
// Append $SID to a url. Borrowed from phplib and modified. This is an
// extra routine utilised by the session code above and acts as a wrapper
***************
*** 391,397 ****
if ( !empty($SID) && !preg_match('#sid=#', $url) )
{
! $url .= ( ( strpos($url, '?') != false ) ? ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID;
}
return $url;
--- 508,514 ----
if ( !empty($SID) && !preg_match('#sid=#', $url) )
{
! $url .= ( ( strpos($url, '?') !== false ) ? ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID;
}
return $url;
diff -crN phpbb2013/includes/smtp.php phpbb2019/includes/smtp.php
*** phpbb2013/includes/smtp.php Sun Feb 27 20:30:44 2005
--- phpbb2019/includes/smtp.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: smtp.php,v 1.16.2.9 2003/07/18 16:34:01 acydburn Exp $
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: smtp.php,v 1.16.2.11 2005/09/27 20:24:35 grahamje Exp $
*
***************************************************************************/
***************
*** 27,33 ****
// using SMTP Extensions
//
function server_parse($socket, $response, $line = __LINE__)
! {
while (substr($server_response, 3, 1) != ' ')
{
if (!($server_response = fgets($socket, 256)))
--- 27,34 ----
// using SMTP Extensions
//
function server_parse($socket, $response, $line = __LINE__)
! {
! $server_response = '';
while (substr($server_response, 3, 1) != ' ')
{
if (!($server_response = fgets($socket, 256)))
***************
*** 106,112 ****
// Ok we have error checked as much as we can to this point let's get on
// it already.
! if( !$socket = fsockopen($board_config['smtp_host'], 25, $errno, $errstr, 20) )
{
message_die(GENERAL_ERROR, "Could not connect to smtp host : $errno : $errstr", "", __LINE__, __FILE__);
}
--- 107,113 ----
// Ok we have error checked as much as we can to this point let's get on
// it already.
! if( !$socket = @fsockopen($board_config['smtp_host'], 25, $errno, $errstr, 20) )
{
message_die(GENERAL_ERROR, "Could not connect to smtp host : $errno : $errstr", "", __LINE__, __FILE__);
}
diff -crN phpbb2013/includes/template.php phpbb2019/includes/template.php
*** phpbb2013/includes/template.php Sun Feb 27 20:30:45 2005
--- phpbb2019/includes/template.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: template.php,v 1.10.2.4 2005/02/21 18:37:50 acydburn Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: template.php,v 1.10.2.5 2005/05/06 20:50:11 acydburn Exp $
*
*
***************************************************************************/
***************
*** 475,478 ****
}
! ?>
--- 475,478 ----
}
! ?>
\ No newline at end of file
diff -crN phpbb2013/includes/topic_review.php phpbb2019/includes/topic_review.php
*** phpbb2013/includes/topic_review.php Sun Feb 27 20:30:45 2005
--- phpbb2019/includes/topic_review.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: topic_review.php,v 1.5.2.3 2004/11/18 17:49:45 acydburn Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: topic_review.php,v 1.5.2.4 2005/05/06 20:50:12 acydburn Exp $
*
*
***************************************************************************/
***************
*** 225,228 ****
}
}
! ?>
--- 225,228 ----
}
}
! ?>
\ No newline at end of file
diff -crN phpbb2013/includes/usercp_activate.php phpbb2019/includes/usercp_activate.php
*** phpbb2013/includes/usercp_activate.php Sun Feb 27 20:30:45 2005
--- phpbb2019/includes/usercp_activate.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: usercp_activate.php,v 1.6.2.7 2003/05/03 23:24:02 acydburn Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: usercp_activate.php,v 1.6.2.9 2005/09/14 18:14:30 acydburn Exp $
*
*
***************************************************************************/
***************
*** 47,52 ****
--- 47,64 ----
}
else if ((trim($row['user_actkey']) == trim($HTTP_GET_VARS['act_key'])) && (trim($row['user_actkey']) != ''))
{
+ if (intval($board_config['require_activation']) == USER_ACTIVATION_ADMIN && $row['user_newpasswd'] == '')
+ {
+ if (!$userdata['session_logged_in'])
+ {
+ redirect(append_sid('login.' . $phpEx . '?redirect=profile.' . $phpEx . '&mode=activate&' . POST_USERS_URL . '=' . $row['user_id'] . '&act_key=' . trim($HTTP_GET_VARS['act_key'])));
+ }
+ else if ($userdata['user_level'] != ADMIN)
+ {
+ message_die(GENERAL_MESSAGE, $lang['Not_Authorised']);
+ }
+ }
+
$sql_update_pass = ( $row['user_newpasswd'] != '' ) ? ", user_password = '" . str_replace("\'", "''", $row['user_newpasswd']) . "', user_newpasswd = ''" : '';
$sql = "UPDATE " . USERS_TABLE . "
diff -crN phpbb2013/includes/usercp_avatar.php phpbb2019/includes/usercp_avatar.php
*** phpbb2013/includes/usercp_avatar.php Sun Feb 27 20:30:45 2005
--- phpbb2019/includes/usercp_avatar.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: usercp_avatar.php,v 1.8.2.19 2005/02/21 18:37:51 acydburn Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: usercp_avatar.php,v 1.8.2.22 2005/10/30 15:17:14 acydburn Exp $
*
*
***************************************************************************/
***************
*** 63,81 ****
return ", user_avatar = '', user_avatar_type = " . USER_AVATAR_NONE;
}
! function user_avatar_gallery($mode, &$error, &$error_msg, $avatar_filename)
{
global $board_config;
! $avatar_filename = str_replace(array('../', '..\\', './', '.\\'), '', $avatar_filename);
! if ($avatar_filename{0} == '/' || $avatar_filename{0} == "\\")
{
return '';
}
! if ( file_exists(@phpbb_realpath($board_config['avatar_gallery_path'] . '/' . $avatar_filename)) && ($mode == 'editprofile') )
{
! $return = ", user_avatar = '" . str_replace("\'", "''", $avatar_filename) . "', user_avatar_type = " . USER_AVATAR_GALLERY;
}
else
{
--- 63,88 ----
return ", user_avatar = '', user_avatar_type = " . USER_AVATAR_NONE;
}
! function user_avatar_gallery($mode, &$error, &$error_msg, $avatar_filename, $avatar_category)
{
global $board_config;
! $avatar_filename = phpbb_ltrim(basename($avatar_filename), "'");
! $avatar_category = phpbb_ltrim(basename($avatar_category), "'");
!
! if(!preg_match('/(\.gif$|\.png$|\.jpg|\.jpeg)$/is', $avatar_filename))
{
return '';
}
! if ($avatar_filename == "" || $avatar_category == "")
! {
! return '';
! }
!
! if ( file_exists(@phpbb_realpath($board_config['avatar_gallery_path'] . '/' . $avatar_category . '/' . $avatar_filename)) && ($mode == 'editprofile') )
{
! $return = ", user_avatar = '" . str_replace("\'", "''", $avatar_category . '/' . $avatar_filename) . "', user_avatar_type = " . USER_AVATAR_GALLERY;
}
else
{
***************
*** 86,91 ****
--- 93,100 ----
function user_avatar_url($mode, &$error, &$error_msg, $avatar_filename)
{
+ global $lang;
+
if ( !preg_match('#^(http)|(ftp):\/\/#i', $avatar_filename) )
{
$avatar_filename = 'http://' . $avatar_filename;
***************
*** 108,113 ****
--- 117,125 ----
$ini_val = ( @phpversion() >= '4.0.0' ) ? 'ini_get' : 'get_cfg_var';
+ $width = $height = 0;
+ $type = '';
+
if ( $avatar_mode == 'remote' && preg_match('/^(http:\/\/)?([\w\-\.]+)\:?([0-9]*)\/(.*)$/', $avatar_filename, $url_ary) )
{
if ( empty($url_ary[4]) )
***************
*** 165,171 ****
message_die(GENERAL_ERROR, 'Could not write avatar file to local storage. Please contact the board administrator with this message', '', __LINE__, __FILE__);
}
! list($width, $height) = @getimagesize($tmp_filename);
}
else
{
--- 177,183 ----
message_die(GENERAL_ERROR, 'Could not write avatar file to local storage. Please contact the board administrator with this message', '', __LINE__, __FILE__);
}
! list($width, $height, $type) = @getimagesize($tmp_filename);
}
else
{
***************
*** 191,197 ****
return;
}
! list($width, $height) = @getimagesize($avatar_filename);
}
if ( !($imgtype = check_image_type($avatar_filetype, $error, $error_msg)) )
--- 203,209 ----
return;
}
! list($width, $height, $type) = @getimagesize($avatar_filename);
}
if ( !($imgtype = check_image_type($avatar_filetype, $error, $error_msg)) )
***************
*** 199,214 ****
return;
}
! if ( $width <= $board_config['avatar_max_width'] && $height <= $board_config['avatar_max_height'] )
{
$new_filename = uniqid(rand()) . $imgtype;
if ( $mode == 'editprofile' && $current_type == USER_AVATAR_UPLOAD && $current_avatar != '' )
{
! if ( file_exists(@phpbb_realpath('./' . $board_config['avatar_path'] . '/' . $current_avatar)) )
! {
! @unlink('./' . $board_config['avatar_path'] . '/' . $current_avatar);
! }
}
if( $avatar_mode == 'remote' )
--- 211,261 ----
return;
}
! switch ($type)
! {
! // GIF
! case 1:
! if ($imgtype != '.gif')
! {
! @unlink($tmp_filename);
! message_die(GENERAL_ERROR, 'Unable to upload file', '', __LINE__, __FILE__);
! }
! break;
!
! // JPG, JPC, JP2, JPX, JB2
! case 2:
! case 9:
! case 10:
! case 11:
! case 12:
! if ($imgtype != '.jpg' && $imgtype != '.jpeg')
! {
! @unlink($tmp_filename);
! message_die(GENERAL_ERROR, 'Unable to upload file', '', __LINE__, __FILE__);
! }
! break;
!
! // PNG
! case 3:
! if ($imgtype != '.png')
! {
! @unlink($tmp_filename);
! message_die(GENERAL_ERROR, 'Unable to upload file', '', __LINE__, __FILE__);
! }
! break;
!
! default:
! @unlink($tmp_filename);
! message_die(GENERAL_ERROR, 'Unable to upload file', '', __LINE__, __FILE__);
! }
!
! if ( $width > 0 && $height > 0 && $width <= $board_config['avatar_max_width'] && $height <= $board_config['avatar_max_height'] )
{
$new_filename = uniqid(rand()) . $imgtype;
if ( $mode == 'editprofile' && $current_type == USER_AVATAR_UPLOAD && $current_avatar != '' )
{
! user_avatar_delete($current_type, $current_avatar);
}
if( $avatar_mode == 'remote' )
***************
*** 274,280 ****
{
if( preg_match('/(\.gif$|\.png$|\.jpg|\.jpeg)$/is', $sub_file) )
{
! $avatar_images[$file][$avatar_row_count][$avatar_col_count] = $file . '/' . $sub_file;
$avatar_name[$file][$avatar_row_count][$avatar_col_count] = ucfirst(str_replace("_", " ", preg_replace('/^(.*)\..*$/', '\1', $sub_file)));
$avatar_col_count++;
--- 321,327 ----
{
if( preg_match('/(\.gif$|\.png$|\.jpg|\.jpeg)$/is', $sub_file) )
{
! $avatar_images[$file][$avatar_row_count][$avatar_col_count] = $sub_file;
$avatar_name[$file][$avatar_row_count][$avatar_col_count] = ucfirst(str_replace("_", " ", preg_replace('/^(.*)\..*$/', '\1', $sub_file)));
$avatar_col_count++;
***************
*** 320,326 ****
for($j = 0; $j < count($avatar_images[$category][$i]); $j++)
{
$template->assign_block_vars('avatar_row.avatar_column', array(
! "AVATAR_IMAGE" => $board_config['avatar_gallery_path'] . '/' . $avatar_images[$category][$i][$j],
"AVATAR_NAME" => $avatar_name[$category][$i][$j])
);
--- 367,373 ----
for($j = 0; $j < count($avatar_images[$category][$i]); $j++)
{
$template->assign_block_vars('avatar_row.avatar_column', array(
! "AVATAR_IMAGE" => $board_config['avatar_gallery_path'] . '/' . $category . '/' . $avatar_images[$category][$i][$j],
"AVATAR_NAME" => $avatar_name[$category][$i][$j])
);
***************
*** 332,338 ****
$params = array('coppa', 'user_id', 'username', 'email', 'current_email', 'cur_password', 'new_password', 'password_confirm', 'icq', 'aim', 'msn', 'yim', 'website', 'location', 'occupation', 'interests', 'signature', 'viewemail', 'notifypm', 'popup_pm', 'notifyreply', 'attachsig', 'allowhtml', 'allowbbcode', 'allowsmilies', 'hideonline', 'style', 'language', 'timezone', 'dateformat');
! $s_hidden_vars = '';
for($i = 0; $i < count($params); $i++)
{
--- 379,385 ----
$params = array('coppa', 'user_id', 'username', 'email', 'current_email', 'cur_password', 'new_password', 'password_confirm', 'icq', 'aim', 'msn', 'yim', 'website', 'location', 'occupation', 'interests', 'signature', 'viewemail', 'notifypm', 'popup_pm', 'notifyreply', 'attachsig', 'allowhtml', 'allowbbcode', 'allowsmilies', 'hideonline', 'style', 'language', 'timezone', 'dateformat');
! $s_hidden_vars = '';
for($i = 0; $i < count($params); $i++)
{
diff -crN phpbb2013/includes/usercp_confirm.php phpbb2019/includes/usercp_confirm.php
*** phpbb2013/includes/usercp_confirm.php Sun Feb 27 20:30:44 2005
--- phpbb2019/includes/usercp_confirm.php Fri Dec 30 11:38:18 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: usercp_confirm.php,v 1.1.2.1 2004/11/18 17:49:45 acydburn Exp $
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: usercp_confirm.php,v 1.1.2.2 2005/12/29 11:51:11 acydburn Exp $
*
***************************************************************************/
***************
*** 153,170 ****
}
else
{
! if (!empty($HTTP_GET_VARS['c']))
! {
! $_png = define_raw_pngs();
! $char = substr($code, intval($HTTP_GET_VARS['c']) - 1, 1);
! header('Content-Type: image/png');
! header('Cache-control: no-cache, no-store');
! echo base64_decode($_png[$char]);
! unset($_png);
! exit;
! }
}
exit;
--- 153,167 ----
}
else
{
! $_png = define_raw_pngs();
! $char = substr($code, -1);
! header('Content-Type: image/png');
! header('Cache-control: no-cache, no-store');
! echo base64_decode($_png[$char]);
! unset($_png);
! exit;
}
exit;
diff -crN phpbb2013/includes/usercp_register.php phpbb2019/includes/usercp_register.php
*** phpbb2013/includes/usercp_register.php Sun Feb 27 20:30:45 2005
--- phpbb2019/includes/usercp_register.php Fri Dec 30 11:38:19 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: usercp_register.php,v 1.20.2.59 2005/02/21 18:37:51 acydburn Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: usercp_register.php,v 1.20.2.70 2005/12/29 11:51:11 acydburn Exp $
*
*
***************************************************************************/
***************
*** 73,78 ****
--- 73,79 ----
// ---------------------------------------
$error = FALSE;
+ $error_msg = '';
$page_title = ( $mode == 'editprofile' ) ? $lang['Edit_profile'] : $lang['Register'];
if ( $mode == 'register' && !isset($HTTP_POST_VARS['agreed']) && !isset($HTTP_GET_VARS['agreed']) )
***************
*** 106,113 ****
$current_email = trim(htmlspecialchars($HTTP_POST_VARS['current_email']));
}
! $strip_var_list = array('username' => 'username', 'email' => 'email', 'icq' => 'icq', 'aim' => 'aim', 'msn' => 'msn', 'yim' => 'yim', 'website' => 'website', 'location' => 'location', 'occupation' => 'occupation', 'interests' => 'interests');
! $strip_var_list['confirm_code'] = 'confirm_code';
// Strip all tags from data ... may p**s some people off, bah, strip_tags is
// doing the job but can still break HTML output ... have no choice, have
--- 107,113 ----
$current_email = trim(htmlspecialchars($HTTP_POST_VARS['current_email']));
}
! $strip_var_list = array('email' => 'email', 'icq' => 'icq', 'aim' => 'aim', 'msn' => 'msn', 'yim' => 'yim', 'website' => 'website', 'location' => 'location', 'occupation' => 'occupation', 'interests' => 'interests', 'confirm_code' => 'confirm_code');
// Strip all tags from data ... may p**s some people off, bah, strip_tags is
// doing the job but can still break HTML output ... have no choice, have
***************
*** 120,125 ****
--- 120,127 ----
}
}
+ $username = ( !empty($HTTP_POST_VARS['username']) ) ? phpbb_clean_username($HTTP_POST_VARS['username']) : '';
+
$trim_var_list = array('cur_password' => 'cur_password', 'new_password' => 'new_password', 'password_confirm' => 'password_confirm', 'signature' => 'signature');
while( list($var, $param) = @each($trim_var_list) )
***************
*** 152,158 ****
}
else
{
! $attachsig = ( isset($HTTP_POST_VARS['attachsig']) ) ? ( ($HTTP_POST_VARS['attachsig']) ? TRUE : 0 ) : 0;
$allowhtml = ( isset($HTTP_POST_VARS['allowhtml']) ) ? ( ($HTTP_POST_VARS['allowhtml']) ? TRUE : 0 ) : $userdata['user_allowhtml'];
$allowbbcode = ( isset($HTTP_POST_VARS['allowbbcode']) ) ? ( ($HTTP_POST_VARS['allowbbcode']) ? TRUE : 0 ) : $userdata['user_allowbbcode'];
--- 154,160 ----
}
else
{
! $attachsig = ( isset($HTTP_POST_VARS['attachsig']) ) ? ( ($HTTP_POST_VARS['attachsig']) ? TRUE : 0 ) : $userdata['user_attachsig'];
$allowhtml = ( isset($HTTP_POST_VARS['allowhtml']) ) ? ( ($HTTP_POST_VARS['allowhtml']) ? TRUE : 0 ) : $userdata['user_allowhtml'];
$allowbbcode = ( isset($HTTP_POST_VARS['allowbbcode']) ) ? ( ($HTTP_POST_VARS['allowbbcode']) ? TRUE : 0 ) : $userdata['user_allowbbcode'];
***************
*** 192,197 ****
--- 194,200 ----
$user_dateformat = ( !empty($HTTP_POST_VARS['dateformat']) ) ? trim(htmlspecialchars($HTTP_POST_VARS['dateformat'])) : $board_config['default_dateformat'];
$user_avatar_local = ( isset($HTTP_POST_VARS['avatarselect']) && !empty($HTTP_POST_VARS['submitavatar']) && $board_config['allow_avatar_local'] ) ? htmlspecialchars($HTTP_POST_VARS['avatarselect']) : ( ( isset($HTTP_POST_VARS['avatarlocal']) ) ? htmlspecialchars($HTTP_POST_VARS['avatarlocal']) : '' );
+ $user_avatar_category = ( isset($HTTP_POST_VARS['avatarcatname']) && $board_config['allow_avatar_local'] ) ? htmlspecialchars($HTTP_POST_VARS['avatarcatname']) : '' ;
$user_avatar_remoteurl = ( !empty($HTTP_POST_VARS['avatarremoteurl']) ) ? trim(htmlspecialchars($HTTP_POST_VARS['avatarremoteurl'])) : '';
$user_avatar_upload = ( !empty($HTTP_POST_VARS['avatarurl']) ) ? trim($HTTP_POST_VARS['avatarurl']) : ( ( $HTTP_POST_FILES['avatar']['tmp_name'] != "none") ? $HTTP_POST_FILES['avatar']['tmp_name'] : '' );
***************
*** 199,206 ****
$user_avatar_size = ( !empty($HTTP_POST_FILES['avatar']['size']) ) ? $HTTP_POST_FILES['avatar']['size'] : 0;
$user_avatar_filetype = ( !empty($HTTP_POST_FILES['avatar']['type']) ) ? $HTTP_POST_FILES['avatar']['type'] : '';
! $user_avatar = ( empty($user_avatar_loc) && $mode == 'editprofile' ) ? $userdata['user_avatar'] : '';
! $user_avatar_type = ( empty($user_avatar_loc) && $mode == 'editprofile' ) ? $userdata['user_avatar_type'] : '';
if ( (isset($HTTP_POST_VARS['avatargallery']) || isset($HTTP_POST_VARS['submitavatar']) || isset($HTTP_POST_VARS['cancelavatar'])) && (!isset($HTTP_POST_VARS['submit'])) )
{
--- 202,209 ----
$user_avatar_size = ( !empty($HTTP_POST_FILES['avatar']['size']) ) ? $HTTP_POST_FILES['avatar']['size'] : 0;
$user_avatar_filetype = ( !empty($HTTP_POST_FILES['avatar']['type']) ) ? $HTTP_POST_FILES['avatar']['type'] : '';
! $user_avatar = ( empty($user_avatar_local) && $mode == 'editprofile' ) ? $userdata['user_avatar'] : '';
! $user_avatar_type = ( empty($user_avatar_local) && $mode == 'editprofile' ) ? $userdata['user_avatar_type'] : '';
if ( (isset($HTTP_POST_VARS['avatargallery']) || isset($HTTP_POST_VARS['submitavatar']) || isset($HTTP_POST_VARS['cancelavatar'])) && (!isset($HTTP_POST_VARS['submit'])) )
{
***************
*** 219,232 ****
$location = stripslashes($location);
$occupation = stripslashes($occupation);
$interests = stripslashes($interests);
! $signature = stripslashes($signature);
$user_lang = stripslashes($user_lang);
$user_dateformat = stripslashes($user_dateformat);
if ( !isset($HTTP_POST_VARS['cancelavatar']))
{
! $user_avatar = $user_avatar_local;
$user_avatar_type = USER_AVATAR_GALLERY;
}
}
--- 222,235 ----
$location = stripslashes($location);
$occupation = stripslashes($occupation);
$interests = stripslashes($interests);
! $signature = htmlspecialchars(stripslashes($signature));
$user_lang = stripslashes($user_lang);
$user_dateformat = stripslashes($user_dateformat);
if ( !isset($HTTP_POST_VARS['cancelavatar']))
{
! $user_avatar = $user_avatar_category . '/' . $user_avatar_local;
$user_avatar_type = USER_AVATAR_GALLERY;
}
}
***************
*** 293,298 ****
--- 296,307 ----
if ($row = $db->sql_fetchrow($result))
{
+ // Only compare one char if the zlib-extension is not loaded
+ if (!@extension_loaded('zlib'))
+ {
+ $row['code'] = substr($row['code'], -1);
+ }
+
if ($row['code'] != $confirm_code)
{
$error = TRUE;
***************
*** 409,417 ****
// Error is already triggered, since one field is empty.
$error = TRUE;
}
! else if ( $username != $userdata['username'] || $mode == 'register' )
{
! if (strtolower($username) != strtolower($userdata['username']))
{
$result = validate_username($username);
if ( $result['error'] )
--- 418,426 ----
// Error is already triggered, since one field is empty.
$error = TRUE;
}
! else if ( $username != $userdata['username'] || $mode == 'register')
{
! if (strtolower($username) != strtolower($userdata['username']) || $mode == 'register')
{
$result = validate_username($username);
if ( $result['error'] )
***************
*** 436,442 ****
$error_msg .= ( ( isset($error_msg) ) ? '
' : '' ) . $lang['Signature_too_long'];
}
! if ( $signature_bbcode_uid == '' )
{
$signature_bbcode_uid = ( $allowbbcode ) ? make_bbcode_uid() : '';
}
--- 445,451 ----
$error_msg .= ( ( isset($error_msg) ) ? '
' : '' ) . $lang['Signature_too_long'];
}
! if ( !isset($signature_bbcode_uid) || $signature_bbcode_uid == '' )
{
$signature_bbcode_uid = ( $allowbbcode ) ? make_bbcode_uid() : '';
}
***************
*** 454,460 ****
{
$avatar_sql = user_avatar_delete($userdata['user_avatar_type'], $userdata['user_avatar']);
}
!
if ( ( !empty($user_avatar_upload) || !empty($user_avatar_name) ) && $board_config['allow_avatar_upload'] )
{
if ( !empty($user_avatar_upload) )
--- 463,469 ----
{
$avatar_sql = user_avatar_delete($userdata['user_avatar_type'], $userdata['user_avatar']);
}
! else
if ( ( !empty($user_avatar_upload) || !empty($user_avatar_name) ) && $board_config['allow_avatar_upload'] )
{
if ( !empty($user_avatar_upload) )
***************
*** 472,490 ****
}
else if ( $user_avatar_remoteurl != '' && $board_config['allow_avatar_remote'] )
{
! if ( @file_exists(@phpbb_realpath('./' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'])) )
! {
! @unlink(@phpbb_realpath('./' . $board_config['avatar_path'] . '/' . $userdata['user_avatar']));
! }
$avatar_sql = user_avatar_url($mode, $error, $error_msg, $user_avatar_remoteurl);
}
else if ( $user_avatar_local != '' && $board_config['allow_avatar_local'] )
{
! if ( @file_exists(@phpbb_realpath('./' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'])) )
! {
! @unlink(@phpbb_realpath('./' . $board_config['avatar_path'] . '/' . $userdata['user_avatar']));
! }
! $avatar_sql = user_avatar_gallery($mode, $error, $error_msg, $user_avatar_local);
}
if ( !$error )
--- 481,493 ----
}
else if ( $user_avatar_remoteurl != '' && $board_config['allow_avatar_remote'] )
{
! user_avatar_delete($userdata['user_avatar_type'], $userdata['user_avatar']);
$avatar_sql = user_avatar_url($mode, $error, $error_msg, $user_avatar_remoteurl);
}
else if ( $user_avatar_local != '' && $board_config['allow_avatar_local'] )
{
! user_avatar_delete($userdata['user_avatar_type'], $userdata['user_avatar']);
! $avatar_sql = user_avatar_gallery($mode, $error, $error_msg, $user_avatar_local, $user_avatar_category);
}
if ( !$error )
***************
*** 532,553 ****
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']);
! $emailer->from($board_config['board_email']);
! $emailer->replyto($board_config['board_email']);
!
! $emailer->use_template('user_activate', stripslashes($user_lang));
! $emailer->email_address($email);
! $emailer->set_subject($lang['Reactivate']);
!
! $emailer->assign_vars(array(
! 'SITENAME' => $board_config['sitename'],
! 'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\'", "'", $username), 0, 25)),
! 'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('
', "\n", "-- \n" . $board_config['board_email_sig']) : '',
!
! 'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey)
! );
! $emailer->send();
! $emailer->reset();
$message = $lang['Profile_updated_inactive'] . '
' . sprintf($lang['Click_return_index'], '', '');
}
--- 535,590 ----
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']);
! if ( $board_config['require_activation'] != USER_ACTIVATION_ADMIN )
! {
! $emailer->from($board_config['board_email']);
! $emailer->replyto($board_config['board_email']);
!
! $emailer->use_template('user_activate', stripslashes($user_lang));
! $emailer->email_address($email);
! $emailer->set_subject($lang['Reactivate']);
!
! $emailer->assign_vars(array(
! 'SITENAME' => $board_config['sitename'],
! 'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\'", "'", $username), 0, 25)),
! 'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('
', "\n", "-- \n" . $board_config['board_email_sig']) : '',
!
! 'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey)
! );
! $emailer->send();
! $emailer->reset();
! }
! else if ( $board_config['require_activation'] == USER_ACTIVATION_ADMIN )
! {
! $sql = 'SELECT user_email, user_lang
! FROM ' . USERS_TABLE . '
! WHERE user_level = ' . ADMIN;
!
! if ( !($result = $db->sql_query($sql)) )
! {
! message_die(GENERAL_ERROR, 'Could not select Administrators', '', __LINE__, __FILE__, $sql);
! }
!
! while ($row = $db->sql_fetchrow($result))
! {
! $emailer->from($board_config['board_email']);
! $emailer->replyto($board_config['board_email']);
!
! $emailer->email_address(trim($row['user_email']));
! $emailer->use_template("admin_activate", $row['user_lang']);
! $emailer->set_subject($lang['Reactivate']);
!
! $emailer->assign_vars(array(
! 'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\'", "'", $username), 0, 25)),
! 'EMAIL_SIG' => str_replace('
', "\n", "-- \n" . $board_config['board_email_sig']),
!
! 'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey)
! );
! $emailer->send();
! $emailer->reset();
! }
! $db->sql_freeresult($result);
! }
$message = $lang['Profile_updated_inactive'] . '
' . sprintf($lang['Click_return_index'], '', '');
}
***************
*** 818,824 ****
$allowviewonline = !$allowviewonline;
! display_avatar_gallery($mode, $avatar_category, $user_id, $email, $current_email, $coppa, $username, $email, &$new_password, &$cur_password, $password_confirm, $icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature, $viewemail, $notifypm, $popup_pm, $notifyreply, $attachsig, $allowhtml, $allowbbcode, $allowsmilies, $allowviewonline, $user_style, $user_lang, $user_timezone, $user_dateformat, $userdata['session_id']);
}
else
{
--- 855,861 ----
$allowviewonline = !$allowviewonline;
! display_avatar_gallery($mode, $avatar_category, $user_id, $email, $current_email, $coppa, $username, $email, $new_password, $cur_password, $password_confirm, $icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature, $viewemail, $notifypm, $popup_pm, $notifyreply, $attachsig, $allowhtml, $allowbbcode, $allowsmilies, $allowviewonline, $user_style, $user_lang, $user_timezone, $user_dateformat, $userdata['session_id']);
}
else
{
***************
*** 829,837 ****
$coppa = FALSE;
}
! if ( !isset($user_template) )
{
! $selected_template = $board_config['system_template'];
}
$avatar_img = '';
--- 866,874 ----
$coppa = FALSE;
}
! if ( !isset($user_style) )
{
! $user_style = $board_config['default_style'];
}
$avatar_img = '';
***************
*** 864,870 ****
if ( !empty($user_avatar_local) )
{
! $s_hidden_fields .= '';
}
$html_status = ( $userdata['user_allowhtml'] && $board_config['allow_html'] ) ? $lang['HTML_is_ON'] : $lang['HTML_is_OFF'];
--- 901,907 ----
if ( !empty($user_avatar_local) )
{
! $s_hidden_fields .= '';
}
$html_status = ( $userdata['user_allowhtml'] && $board_config['allow_html'] ) ? $lang['HTML_is_ON'] : $lang['HTML_is_OFF'];
diff -crN phpbb2013/includes/usercp_sendpasswd.php phpbb2019/includes/usercp_sendpasswd.php
*** phpbb2013/includes/usercp_sendpasswd.php Sun Feb 27 20:30:45 2005
--- phpbb2019/includes/usercp_sendpasswd.php Fri Dec 30 11:38:19 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: usercp_sendpasswd.php,v 1.6.2.12 2004/11/18 17:49:45 acydburn Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: usercp_sendpasswd.php,v 1.6.2.13 2005/09/14 18:14:30 acydburn Exp $
*
*
***************************************************************************/
***************
*** 50,56 ****
$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);
--- 50,56 ----
$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);
$user_password = gen_rand_string(false);
diff -crN phpbb2013/includes/usercp_viewprofile.php phpbb2019/includes/usercp_viewprofile.php
*** phpbb2013/includes/usercp_viewprofile.php Sun Feb 27 20:30:45 2005
--- phpbb2019/includes/usercp_viewprofile.php Fri Dec 30 11:38:19 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: usercp_viewprofile.php,v 1.5.2.3 2004/11/18 17:49:45 acydburn Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: usercp_viewprofile.php,v 1.5.2.6 2005/09/14 18:14:30 acydburn Exp $
*
*
***************************************************************************/
***************
*** 33,38 ****
--- 33,43 ----
}
$profiledata = get_userdata($HTTP_GET_VARS[POST_USERS_URL]);
+ if (!$profiledata)
+ {
+ message_die(GENERAL_MESSAGE, $lang['No_user_id_specified']);
+ }
+
$sql = "SELECT *
FROM " . RANKS_TABLE . "
ORDER BY rank_special, rank_min";
***************
*** 160,167 ****
$yim = ( $profiledata['user_yim'] ) ? '' . $lang['YIM'] . '' : '';
$temp_url = append_sid("search.$phpEx?search_author=" . urlencode($profiledata['username']) . "&showresults=posts");
! $search_img = '
';
! $search = '' . $lang['Search_user_posts'] . '';
//
// Generate page
--- 165,172 ----
$yim = ( $profiledata['user_yim'] ) ? '' . $lang['YIM'] . '' : '';
$temp_url = append_sid("search.$phpEx?search_author=" . urlencode($profiledata['username']) . "&showresults=posts");
! $search_img = '
';
! $search = '' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '';
//
// Generate page
diff -crN phpbb2013/index.php phpbb2019/index.php
*** phpbb2013/index.php Sun Feb 27 20:30:46 2005
--- phpbb2019/index.php Fri Dec 30 11:38:20 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: index.php,v 1.99.2.3 2004/07/11 16:46:15 acydburn Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: index.php,v 1.99.2.6 2005/10/30 15:17:13 acydburn Exp $
*
*
***************************************************************************/
***************
*** 183,190 ****
// Obtain a list of topic ids which contain
// posts made since user last visited
//
! if ( $userdata['session_logged_in'] )
{
$sql = "SELECT t.forum_id, t.topic_id, p.post_time
FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p
WHERE p.post_id = t.topic_last_post_id
--- 183,196 ----
// Obtain a list of topic ids which contain
// posts made since user last visited
//
! if ($userdata['session_logged_in'])
{
+ // 60 days limit
+ if ($userdata['user_lastvisit'] < (time() - 5184000))
+ {
+ $userdata['user_lastvisit'] = time() - 5184000;
+ }
+
$sql = "SELECT t.forum_id, t.topic_id, p.post_time
FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p
WHERE p.post_id = t.topic_last_post_id
diff -crN phpbb2013/language/lang_english/email/topic_notify.tpl phpbb2019/language/lang_english/email/topic_notify.tpl
*** phpbb2013/language/lang_english/email/topic_notify.tpl Sun Feb 27 20:30:45 2005
--- phpbb2019/language/lang_english/email/topic_notify.tpl Fri Dec 30 11:38:19 2005
***************
*** 1,7 ****
Subject: Topic Reply Notification - {TOPIC_TITLE}
Charset: iso-8859-1
! Hello {USERNAME},
You are receiving this email because you are watching the topic, "{TOPIC_TITLE}" at {SITENAME}. This topic has received a reply since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic.
--- 1,7 ----
Subject: Topic Reply Notification - {TOPIC_TITLE}
Charset: iso-8859-1
! Hello,
You are receiving this email because you are watching the topic, "{TOPIC_TITLE}" at {SITENAME}. This topic has received a reply since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic.
diff -crN phpbb2013/language/lang_english/lang_admin.php phpbb2019/language/lang_english/lang_admin.php
*** phpbb2013/language/lang_english/lang_admin.php Sun Feb 27 20:30:45 2005
--- phpbb2019/language/lang_english/lang_admin.php Fri Dec 30 11:38:19 2005
***************
*** 7,13 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: lang_admin.php,v 1.35.2.10 2005/02/21 18:38:17 acydburn Exp $
*
****************************************************************************/
--- 7,13 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: lang_admin.php,v 1.35.2.13 2005/12/29 11:51:12 acydburn Exp $
*
****************************************************************************/
***************
*** 335,340 ****
--- 335,346 ----
$lang['Visual_confirm'] = 'Enable Visual Confirmation';
$lang['Visual_confirm_explain'] = 'Requires users enter a code defined by an image when registering.';
+ // Autologin Keys - added 2.0.18
+ $lang['Allow_autologin'] = 'Allow automatic logins';
+ $lang['Allow_autologin_explain'] = 'Determines whether users are allowed to select to be automatically logged in when visiting the forum';
+ $lang['Autologin_time'] = 'Automatic login key expiry';
+ $lang['Autologin_time_explain'] = 'How long a autologin key is valid for in days if the user does not visit the board. Set to zero to disable expiry.';
+
//
// Forum Management
//
***************
*** 621,626 ****
--- 627,633 ----
$lang['Save_Settings'] = 'Save Settings';
$lang['Stylesheet'] = 'CSS Stylesheet';
+ $lang['Stylesheet_explain'] = 'Filename for CSS stylesheet to use for this theme.';
$lang['Background_image'] = 'Background Image';
$lang['Background_color'] = 'Background Colour';
$lang['Theme_name'] = 'Theme Name';
***************
*** 737,742 ****
--- 744,757 ----
$lang['Version_information'] = 'Version Information';
//
+ // Login attempts configuration
+ //
+ $lang['Max_login_attempts'] = 'Allowed login attempts';
+ $lang['Max_login_attempts_explain'] = 'The number of allowed board login attempts.';
+ $lang['Login_reset_time'] = 'Login lock time';
+ $lang['Login_reset_time_explain'] = 'Time in minutes the user have to wait until he is allowed to login again after exceeding the number of allowed login attempts.';
+
+ //
// That's all Folks!
// -------------------------------------------------
diff -crN phpbb2013/language/lang_english/lang_main.php phpbb2019/language/lang_english/lang_main.php
*** phpbb2013/language/lang_english/lang_main.php Sun Feb 27 20:30:45 2005
--- phpbb2019/language/lang_english/lang_main.php Fri Dec 30 11:38:19 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: lang_main.php,v 1.85.2.15 2003/06/10 00:31:19 psotfx Exp $
*
****************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: lang_main.php,v 1.85.2.20 2005/12/30 09:51:02 acydburn Exp $
*
****************************************************************************/
***************
*** 274,280 ****
$lang['Back_to_top'] = 'Back to top';
$lang['Read_profile'] = 'View user\'s profile';
- $lang['Send_email'] = 'Send e-mail to user';
$lang['Visit_website'] = 'Visit poster\'s website';
$lang['ICQ_status'] = 'ICQ Status';
$lang['Edit_delete_post'] = 'Edit/Delete this post';
--- 274,279 ----
***************
*** 367,373 ****
$lang['Attach_signature'] = 'Attach signature (signatures can be changed in profile)';
$lang['Notify'] = 'Notify me when a reply is posted';
- $lang['Delete_post'] = 'Delete this post';
$lang['Stored'] = 'Your message has been entered successfully.';
$lang['Deleted'] = 'Your message has been deleted successfully.';
--- 366,371 ----
***************
*** 527,536 ****
$lang['Location'] = 'Location';
$lang['Contact'] = 'Contact';
$lang['Email_address'] = 'E-mail address';
- $lang['Email'] = 'E-mail';
$lang['Send_private_message'] = 'Send private message';
$lang['Hidden_email'] = '[ Hidden ]';
- $lang['Search_user_posts'] = 'Search for posts by this user';
$lang['Interests'] = 'Interests';
$lang['Occupation'] = 'Occupation';
$lang['Poster_rank'] = 'Poster rank';
--- 525,532 ----
***************
*** 604,610 ****
$lang['Password_mismatch'] = 'The passwords you entered did not match.';
$lang['Current_password_mismatch'] = 'The current password you supplied does not match that stored in the database.';
$lang['Password_long'] = 'Your password must be no more than 32 characters.';
- $lang['Too_many_registers'] = 'You have made too many registration attempts. Please try again later.';
$lang['Username_taken'] = 'Sorry, but this username has already been taken.';
$lang['Username_invalid'] = 'Sorry, but this username contains an invalid character such as \'.';
$lang['Username_disallowed'] = 'Sorry, but this username has been disallowed.';
--- 600,605 ----
***************
*** 1018,1023 ****
--- 1013,1022 ----
$lang['An_error_occured'] = 'An Error Occurred';
$lang['A_critical_error'] = 'A Critical Error Occurred';
+ $lang['Admin_reauthenticate'] = 'To administer the board you must re-authenticate yourself.';
+ $lang['Login_attempts_exceeded'] = 'The maximum number of %s login attempts has been exceeded. You are not allowed to login for the next %s minutes.';
+ $lang['Please_remove_install_contrib'] = 'Please ensure both the install/ and contrib/ directories are deleted';
+
//
// That's all, Folks!
// -------------------------------------------------
diff -crN phpbb2013/login.php phpbb2019/login.php
*** phpbb2013/login.php Sun Feb 27 20:30:46 2005
--- phpbb2019/login.php Fri Dec 30 11:38:20 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: login.php,v 1.47.2.17 2004/11/18 17:49:35 acydburn Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: login.php,v 1.47.2.21 2005/12/29 11:51:13 acydburn Exp $
*
*
***************************************************************************/
***************
*** 52,63 ****
if( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) || isset($HTTP_POST_VARS['logout']) || isset($HTTP_GET_VARS['logout']) )
{
! if( ( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) ) && !$userdata['session_logged_in'] )
{
$username = isset($HTTP_POST_VARS['username']) ? phpbb_clean_username($HTTP_POST_VARS['username']) : '';
$password = isset($HTTP_POST_VARS['password']) ? $HTTP_POST_VARS['password'] : '';
! $sql = "SELECT user_id, username, user_password, user_active, user_level
FROM " . USERS_TABLE . "
WHERE username = '" . str_replace("\\'", "''", $username) . "'";
if ( !($result = $db->sql_query($sql)) )
--- 52,63 ----
if( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) || isset($HTTP_POST_VARS['logout']) || isset($HTTP_GET_VARS['logout']) )
{
! if( ( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) ) && (!$userdata['session_logged_in'] || isset($HTTP_POST_VARS['admin'])) )
{
$username = isset($HTTP_POST_VARS['username']) ? phpbb_clean_username($HTTP_POST_VARS['username']) : '';
$password = isset($HTTP_POST_VARS['password']) ? $HTTP_POST_VARS['password'] : '';
! $sql = "SELECT user_id, username, user_password, user_active, user_level, user_login_tries, user_last_login_try
FROM " . USERS_TABLE . "
WHERE username = '" . str_replace("\\'", "''", $username) . "'";
if ( !($result = $db->sql_query($sql)) )
***************
*** 73,83 ****
}
else
{
if( md5($password) == $row['user_password'] && $row['user_active'] )
{
$autologin = ( isset($HTTP_POST_VARS['autologin']) ) ? TRUE : 0;
! $session_id = session_begin($row['user_id'], $user_ip, PAGE_INDEX, FALSE, $autologin);
if( $session_id )
{
--- 73,101 ----
}
else
{
+ // If the last login is more than x minutes ago, then reset the login tries/time
+ if ($row['user_last_login_try'] && $board_config['login_reset_time'] && $row['user_last_login_try'] < (time() - ($board_config['login_reset_time'] * 60)))
+ {
+ $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_login_tries = 0, user_last_login_try = 0 WHERE user_id = ' . $row['user_id']);
+ $row['user_last_login_try'] = $row['user_login_tries'] = 0;
+ }
+
+ // Check to see if user is allowed to login again... if his tries are exceeded
+ if ($row['user_last_login_try'] && $board_config['login_reset_time'] && $board_config['max_login_attempts'] &&
+ $row['user_last_login_try'] >= (time() - ($board_config['login_reset_time'] * 60)) && $row['user_login_tries'] >= $board_config['max_login_attempts'])
+ {
+ message_die(GENERAL_MESSAGE, sprintf($lang['Login_attempts_exceeded'], $board_config['max_login_attempts'], $board_config['login_reset_time']));
+ }
+
if( md5($password) == $row['user_password'] && $row['user_active'] )
{
$autologin = ( isset($HTTP_POST_VARS['autologin']) ) ? TRUE : 0;
! $admin = (isset($HTTP_POST_VARS['admin'])) ? 1 : 0;
! $session_id = session_begin($row['user_id'], $user_ip, PAGE_INDEX, FALSE, $autologin, $admin);
!
! // Reset login tries
! $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_login_tries = 0, user_last_login_try = 0 WHERE user_id = ' . $row['user_id']);
if( $session_id )
{
***************
*** 91,96 ****
--- 109,123 ----
}
else
{
+ // Save login tries and last login
+ if ($row['user_id'] != ANONYMOUS)
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_login_tries = user_login_tries + 1, user_last_login_try = ' . time() . '
+ WHERE user_id = ' . $row['user_id'];
+ $db->sql_query($sql);
+ }
+
$redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : '';
$redirect = str_replace('?', '&', $redirect);
***************
*** 130,135 ****
--- 157,168 ----
}
else if( ( isset($HTTP_GET_VARS['logout']) || isset($HTTP_POST_VARS['logout']) ) && $userdata['session_logged_in'] )
{
+ // session id check
+ if ($sid == '' || $sid != $userdata['session_id'])
+ {
+ message_die(GENERAL_ERROR, 'Invalid_session');
+ }
+
if( $userdata['session_logged_in'] )
{
session_end($userdata['session_id'], $userdata['user_id']);
***************
*** 158,164 ****
// Do a full login page dohickey if
// user not already logged in
//
! if( !$userdata['session_logged_in'] )
{
$page_title = $lang['Login'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
--- 191,197 ----
// Do a full login page dohickey if
// user not already logged in
//
! if( !$userdata['session_logged_in'] || (isset($HTTP_GET_VARS['admin']) && $userdata['session_logged_in'] && $userdata['user_level'] == ADMIN))
{
$page_title = $lang['Login'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
***************
*** 167,172 ****
--- 200,207 ----
'body' => 'login_body.tpl')
);
+ $forward_page = '';
+
if( isset($HTTP_POST_VARS['redirect']) || isset($HTTP_GET_VARS['redirect']) )
{
$forward_to = $HTTP_SERVER_VARS['QUERY_STRING'];
***************
*** 178,185 ****
if(count($forward_match) > 1)
{
- $forward_page = '';
-
for($i = 1; $i < count($forward_match); $i++)
{
if( !ereg("sid=", $forward_match[$i]) )
--- 213,218 ----
***************
*** 199,218 ****
}
}
}
- else
- {
- $forward_page = '';
- }
$username = ( $userdata['user_id'] != ANONYMOUS ) ? $userdata['username'] : '';
$s_hidden_fields = '';
! make_jumpbox('viewforum.'.$phpEx, $forum_id);
$template->assign_vars(array(
'USERNAME' => $username,
! 'L_ENTER_PASSWORD' => $lang['Enter_password'],
'L_SEND_PASSWORD' => $lang['Forgotten_password'],
'U_SEND_PASSWORD' => append_sid("profile.$phpEx?mode=sendpassword"),
--- 232,248 ----
}
}
}
$username = ( $userdata['user_id'] != ANONYMOUS ) ? $userdata['username'] : '';
$s_hidden_fields = '';
+ $s_hidden_fields .= (isset($HTTP_GET_VARS['admin'])) ? '' : '';
! make_jumpbox('viewforum.'.$phpEx);
$template->assign_vars(array(
'USERNAME' => $username,
! 'L_ENTER_PASSWORD' => (isset($HTTP_GET_VARS['admin'])) ? $lang['Admin_reauthenticate'] : $lang['Enter_password'],
'L_SEND_PASSWORD' => $lang['Forgotten_password'],
'U_SEND_PASSWORD' => append_sid("profile.$phpEx?mode=sendpassword"),
diff -crN phpbb2013/memberlist.php phpbb2019/memberlist.php
*** phpbb2013/memberlist.php Sun Feb 27 20:30:46 2005
--- phpbb2019/memberlist.php Fri Dec 30 11:38:20 2005
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: memberlist.php,v 1.36.2.10 2004/07/11 16:46:15 acydburn Exp $
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: memberlist.php,v 1.36.2.11 2005/09/14 18:14:30 acydburn Exp $
*
***************************************************************************/
***************
*** 61,67 ****
// Memberlist sorting
//
$mode_types_text = array($lang['Sort_Joined'], $lang['Sort_Username'], $lang['Sort_Location'], $lang['Sort_Posts'], $lang['Sort_Email'], $lang['Sort_Website'], $lang['Sort_Top_Ten']);
! $mode_types = array('joindate', 'username', 'location', 'posts', 'email', 'website', 'topten');
$select_sort_mode = '