diff --git a/phpBB/common.php b/phpBB/common.php
index da2267ea79..7f7b75bb43 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -154,7 +154,7 @@ if( getenv('HTTP_X_FORWARDED_FOR') != '' )
if ( preg_match("/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/", getenv('HTTP_X_FORWARDED_FOR'), $ip_list) )
{
- $private_ip = array('/^0\./', '/^127\.0\.0\.1/', '/^192\.168\..*/', '/^172\.16\..*/', '/^10..*/', '/^224..*/', '/^240..*/');
+ $private_ip = array('/^0\./', '/^127\.0\.0\.1/', '/^192\.168\..*/', '/^172\.16\..*/', '/^10.\.*/', '/^224.\.*/', '/^240.\.*/');
$client_ip = preg_replace($private_ip, $client_ip, $ip_list[1]);
}
}
diff --git a/phpBB/db/schemas/mssql_schema.sql b/phpBB/db/schemas/mssql_schema.sql
index e328d4d7ac..bf0344a3d7 100644
--- a/phpBB/db/schemas/mssql_schema.sql
+++ b/phpBB/db/schemas/mssql_schema.sql
@@ -318,7 +318,7 @@ CREATE TABLE [phpbb_users] (
[user_regdate] [int] NOT NULL ,
[user_level] [smallint] NOT NULL ,
[user_posts] [int] NOT NULL ,
- [user_timezone] [decimal] (4,2) NOT NULL ,
+ [user_timezone] [decimal] (5,2) NOT NULL ,
[user_style] [int] NULL ,
[user_lang] [varchar] (255) NULL ,
[user_dateformat] [varchar] (14) NOT NULL ,
diff --git a/phpBB/db/schemas/mysql_schema.sql b/phpBB/db/schemas/mysql_schema.sql
index b33ed4b3a5..b205ca9005 100644
--- a/phpBB/db/schemas/mysql_schema.sql
+++ b/phpBB/db/schemas/mysql_schema.sql
@@ -464,7 +464,7 @@ CREATE TABLE phpbb_users (
user_regdate int(11) DEFAULT '0' NOT NULL,
user_level tinyint(4) DEFAULT '0',
user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_timezone decimal(4,2) DEFAULT '0' NOT NULL,
+ user_timezone decimal(5,2) DEFAULT '0' NOT NULL,
user_style tinyint(4),
user_lang varchar(255),
user_dateformat varchar(14) DEFAULT 'd M Y H:i' NOT NULL,
diff --git a/phpBB/db/schemas/postgres_schema.sql b/phpBB/db/schemas/postgres_schema.sql
index d20129d649..3dff52361a 100644
--- a/phpBB/db/schemas/postgres_schema.sql
+++ b/phpBB/db/schemas/postgres_schema.sql
@@ -479,7 +479,7 @@ CREATE TABLE phpbb_users (
user_avatar_type int2 DEFAULT '0' NOT NULL,
user_level int4 DEFAULT '1',
user_lang varchar(255),
- user_timezone decimal(4) DEFAULT '0' NOT NULL,
+ user_timezone decimal(5) DEFAULT '0' NOT NULL,
user_dateformat varchar(14) DEFAULT 'd M Y H:m' NOT NULL,
user_notify_pm int2 DEFAULT '1' NOT NULL,
user_popup_pm int2 DEFAULT '0' NOT NULL,
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 5ea4851c66..985a82ecb8 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -87,6 +87,10 @@ h3 {font-size:12pt;color:blue}
Remove email to group moderator when approving new members
Fixed non-handling of HTML in poll options
Fixed non-deletion of polls when deleting forum and its posts
+Fixed moved shadow topic from being bumped upon reply
+Changed field size of timezone to decimal(5,2) where applicable
+Fixed missing sid append to URL when redirecting to newest reply
+Fixed missing slashes in private IP preg check
diff --git a/phpBB/includes/functions_post.php b/phpBB/includes/functions_post.php
index ce3288d6f3..5511e947a6 100644
--- a/phpBB/includes/functions_post.php
+++ b/phpBB/includes/functions_post.php
@@ -452,8 +452,7 @@ function update_post_stats(&$mode, &$post_data, &$forum_id, &$topic_id, &$post_i
{
$sql = "UPDATE " . TOPICS_TABLE . " SET
$topic_update_sql
- WHERE topic_id = $topic_id
- OR topic_moved_id = $topic_id";
+ WHERE topic_id = $topic_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
diff --git a/phpBB/includes/usercp_register.php b/phpBB/includes/usercp_register.php
index 76441593f3..d118659346 100644
--- a/phpBB/includes/usercp_register.php
+++ b/phpBB/includes/usercp_register.php
@@ -101,7 +101,7 @@ if (
{
if ( !empty($HTTP_POST_VARS[$param]) )
{
- $$var = trim(htmlspecialchars(strip_tags($HTTP_POST_VARS[$param])));
+ $$var = trim(htmlspecialchars($HTTP_POST_VARS[$param]));
}
}
diff --git a/phpBB/update_to_204.php b/phpBB/update_to_204.php
index 7a7448e7b7..e503b41383 100644
--- a/phpBB/update_to_204.php
+++ b/phpBB/update_to_204.php
@@ -447,6 +447,7 @@ switch ( $row['config_value'] )
case '.0.3':
// Need to add index to post_id in search_wordmatch (mysql, postgresql, msaccess ... both indexes)
+ // Modify user_timezone to decimal(5,2) ... not for pgsql though
// Add auto_increment equiv to groups table (Doug overlooked it ...) for pgsql and msaccess
//mysql
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index cfca1c9ff6..af79459cea 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -60,9 +60,9 @@ if ( isset($HTTP_GET_VARS['view']) && empty($HTTP_GET_VARS[POST_POST_URL]) )
{
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
- if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid']) )
+ if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid']) || isset($HTTP_GET_VARS['sid']) )
{
- $session_id = $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid'];
+ $session_id = isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid']) ? $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid'] : $HTTP_GET_VARS['sid'];
if ( $session_id )
{
@@ -86,6 +86,8 @@ if ( isset($HTTP_GET_VARS['view']) && empty($HTTP_GET_VARS[POST_POST_URL]) )
$db->sql_close();
$post_id = $row['post_id'];
+
+ $SID = (isset($HTTP_GET_VARS['sid'])) ? 'sid=' . $session_id : '';
header($header_location . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=$post_id#$post_id", true));
exit;
}
@@ -1092,11 +1094,11 @@ for($i = 0; $i < $total_posts; $i++)
{
if ( $user_sig != '' )
{
- $user_sig = preg_replace($orig_word, $replacement_word, $user_sig);
+ $user_sig = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(' . $orig_word . ', ' . $replacement_word . ', '\\0')", '>' . $user_sig . '<'), 1, -1));
}
$post_subject = preg_replace($orig_word, $replacement_word, $post_subject);
- $message = preg_replace($orig_word, $replacement_word, $message);
+ $message = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(' . $orig_word . ', ' . $replacement_word . ', '\\0')", '>' . $message . '<'), 1, -1));
}
//