If your browser does not support meta redirection please click
HERE to be redirected
';
+ exit;
+ }
+
+ // Behave as per HTTP/1.1 spec for others
+ header('Location: ' . $server_protocol . $server_name . $server_port . $script_name . $url);
+ exit;
+ }
+
?>
diff -crbBN phpbb203/includes/functions_post.php phpbb2011/includes/functions_post.php
*** phpbb203/includes/functions_post.php Sat Jul 10 20:16:19 2004
--- phpbb2011/includes/functions_post.php Thu Nov 18 21:02:11 2004
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: functions_post.php,v 1.9.2.10 2002/07/19 22:18:55 psotfx Exp $
*
*
***************************************************************************/
--- 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 $
*
*
***************************************************************************/
***************
*** 20,31 ****
*
***************************************************************************/
! if ( !defined('IN_PHPBB') )
{
die('Hacking attempt');
}
! $html_entities_match = array('#', '#<#', '#>#');
$html_entities_replace = array('&', '<', '>');
$unhtml_specialchars_match = array('#>#', '#<#', '#"#', '#&#');
--- 20,31 ----
*
***************************************************************************/
! if (!defined('IN_PHPBB'))
{
die('Hacking attempt');
}
! $html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#');
$html_entities_replace = array('&', '<', '>');
$unhtml_specialchars_match = array('#>#', '#<#', '#"#', '#&#');
***************
*** 37,52 ****
//
function prepare_message($message, $html_on, $bbcode_on, $smile_on, $bbcode_uid = 0)
{
! global $board_config;
! global $html_entities_match, $html_entities_replace;
! global $code_entities_match, $code_entities_replace;
//
// Clean up the message
//
$message = trim($message);
! if ( $html_on )
{
$allowed_html_tags = split(',', $board_config['allow_html_tags']);
--- 37,50 ----
//
function prepare_message($message, $html_on, $bbcode_on, $smile_on, $bbcode_uid = 0)
{
! global $board_config, $html_entities_match, $html_entities_replace;
//
// Clean up the message
//
$message = trim($message);
! if ($html_on)
{
$allowed_html_tags = split(',', $board_config['allow_html_tags']);
***************
*** 55,86 ****
$tmp_message = '';
$message = ' ' . $message . ' ';
! while ( $start_html = strpos($message, '<', $start_html) )
{
! $tmp_message .= preg_replace($html_entities_match, $html_entities_replace, substr($message, $end_html + 1, ( $start_html - $end_html - 1 )));
! if ( $end_html = strpos($message, '>', $start_html) )
{
$length = $end_html - $start_html + 1;
$hold_string = substr($message, $start_html, $length);
! if ( ( $unclosed_open = strrpos(' ' . $hold_string, '<') ) != 1 )
{
$tmp_message .= preg_replace($html_entities_match, $html_entities_replace, substr($hold_string, 0, $unclosed_open - 1));
$hold_string = substr($hold_string, $unclosed_open - 1);
}
$tagallowed = false;
! for($i = 0; $i < sizeof($allowed_html_tags); $i++)
{
$match_tag = trim($allowed_html_tags[$i]);
! if ( preg_match('/^<\/?' . $match_tag . '(?!(\s*)style(\s*)\\=)/i', $hold_string) )
{
! $tagallowed = true;
}
}
! $tmp_message .= ( $length && !$tagallowed ) ? preg_replace($html_entities_match, $html_entities_replace, $hold_string) : $hold_string;
$start_html += $length;
}
--- 53,84 ----
$tmp_message = '';
$message = ' ' . $message . ' ';
! while ($start_html = strpos($message, '<', $start_html))
{
! $tmp_message .= preg_replace($html_entities_match, $html_entities_replace, substr($message, $end_html + 1, ($start_html - $end_html - 1)));
! if ($end_html = strpos($message, '>', $start_html))
{
$length = $end_html - $start_html + 1;
$hold_string = substr($message, $start_html, $length);
! if (($unclosed_open = strrpos(' ' . $hold_string, '<')) != 1)
{
$tmp_message .= preg_replace($html_entities_match, $html_entities_replace, substr($hold_string, 0, $unclosed_open - 1));
$hold_string = substr($hold_string, $unclosed_open - 1);
}
$tagallowed = false;
! for ($i = 0; $i < sizeof($allowed_html_tags); $i++)
{
$match_tag = trim($allowed_html_tags[$i]);
! if (preg_match('#^<\/?' . $match_tag . '[> ]#i', $hold_string))
{
! $tagallowed = (preg_match('#^<\/?' . $match_tag . ' .*?(style[\t ]*?=|on[\w]+[\t ]*?=)#i', $hold_string)) ? false : true;
}
}
! $tmp_message .= ($length && !$tagallowed) ? preg_replace($html_entities_match, $html_entities_replace, $hold_string) : $hold_string;
$start_html += $length;
}
***************
*** 93,111 ****
}
}
! if ( $end_html != strlen($message) && $tmp_message != '' )
{
$tmp_message .= preg_replace($html_entities_match, $html_entities_replace, substr($message, $end_html + 1));
}
! $message = ( $tmp_message != '' ) ? trim($tmp_message) : trim($message);
}
else
{
$message = preg_replace($html_entities_match, $html_entities_replace, $message);
}
! if( $bbcode_on && $bbcode_uid != '' )
{
$message = bbencode_first_pass($message, $bbcode_uid);
}
--- 91,109 ----
}
}
! if (!$end_html || ($end_html != strlen($message) && $tmp_message != ''))
{
$tmp_message .= preg_replace($html_entities_match, $html_entities_replace, substr($message, $end_html + 1));
}
! $message = ($tmp_message != '') ? trim($tmp_message) : trim($message);
}
else
{
$message = preg_replace($html_entities_match, $html_entities_replace, $message);
}
! if($bbcode_on && $bbcode_uid != '')
{
$message = bbencode_first_pass($message, $bbcode_uid);
}
***************
*** 128,206 ****
global $board_config, $userdata, $lang, $phpEx, $phpbb_root_path;
// Check username
! if ( !empty($username) )
{
! $username = htmlspecialchars(trim(strip_tags($username)));
! if ( !$userdata['session_logged_in'] || ( $userdata['session_logged_in'] && $username != $userdata['username'] ) )
{
include($phpbb_root_path . 'includes/functions_validate.'.$phpEx);
$result = validate_username($username);
! if ( $result['error'] )
{
! $error_msg .= ( !empty($error_msg) ) ? '