[phpBB] svn: r370 - in trunk/phpbb2: patches po

kink at wolffelaar.nl kink at wolffelaar.nl
Tue Apr 10 21:02:50 CEST 2007


Author: kink
Date: 2007-04-10 21:02:48 +0200 (Tue, 10 Apr 2007)
New Revision: 370

Removed:
   trunk/phpbb2/patches/200_CVE-2006-4758.diff
   trunk/phpbb2/patches/200_CVE-2006-6421.diff
   trunk/phpbb2/patches/200_CVE-2006-6839.diff
   trunk/phpbb2/patches/200_CVE-2006-6840.diff
   trunk/phpbb2/patches/200_CVE-2006-6841.diff
Modified:
   trunk/phpbb2/patches/010_sane_defaults_with_autodetection.diff
   trunk/phpbb2/po/templates.pot
Log:
update patches for new version


Modified: trunk/phpbb2/patches/010_sane_defaults_with_autodetection.diff
===================================================================
--- trunk/phpbb2/patches/010_sane_defaults_with_autodetection.diff	2007-04-10 17:58:44 UTC (rev 369)
+++ trunk/phpbb2/patches/010_sane_defaults_with_autodetection.diff	2007-04-10 19:02:48 UTC (rev 370)
@@ -161,7 +161,7 @@
 +INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_name', '');
 +INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '');
 +INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '');
- INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.21');
+ INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.22');
  INSERT INTO phpbb_config (config_name, config_value) VALUES ('rand_seed', '0');
  
 @@ -83,7 +85,7 @@

Deleted: trunk/phpbb2/patches/200_CVE-2006-4758.diff
===================================================================
--- trunk/phpbb2/patches/200_CVE-2006-4758.diff	2007-04-10 17:58:44 UTC (rev 369)
+++ trunk/phpbb2/patches/200_CVE-2006-4758.diff	2007-04-10 19:02:48 UTC (rev 370)
@@ -1,18 +0,0 @@
-diff -ur phpBB2.orig/admin/admin_board.php phpBB2/admin/admin_board.php
---- phpBB2.orig/admin/admin_board.php	2006-07-05 20:53:54.000000000 +0200
-+++ phpBB2/admin/admin_board.php	2006-10-01 13:04:16.945403176 +0200
-@@ -59,6 +59,14 @@
- 			$new['server_name'] = str_replace('http://', '', $new['server_name']);
- 		}
- 
-+		// Make sure paths don't contain weirdness (like the NUL character) CVE-2006-4758
-+		foreach ( array('avatar_path', 'smilies_path', 'avatar_gallery_path') as $path ) {
-+			if ($config_name == $path)
-+			{
-+				$new[$path] = preg_replace('/[^A-Za-z0-9.\/_+=~-]/', '', $new[$path]);
-+			}
-+		}
-+
- 		if( isset($HTTP_POST_VARS['submit']) )
- 		{
- 			$sql = "UPDATE " . CONFIG_TABLE . " SET

Deleted: trunk/phpbb2/patches/200_CVE-2006-6421.diff
===================================================================
--- trunk/phpbb2/patches/200_CVE-2006-6421.diff	2007-04-10 17:58:44 UTC (rev 369)
+++ trunk/phpbb2/patches/200_CVE-2006-6421.diff	2007-04-10 19:02:48 UTC (rev 370)
@@ -1,38 +0,0 @@
-diff -Nur phpBB2.0.21/privmsg.php phpBB2/privmsg.php
---- phpBB2.0.21/privmsg.php	2006-06-09 16:29:43.000000000 +0200
-+++ phpBB2/privmsg.php	2006-12-19 18:29:16.000000000 +0100
-@@ -1376,7 +1385,7 @@
- 
- 		$privmsg_subject = ( isset($HTTP_POST_VARS['subject']) ) ? trim(htmlspecialchars(stripslashes($HTTP_POST_VARS['subject']))) : '';
- 		$privmsg_message = ( isset($HTTP_POST_VARS['message']) ) ? trim($HTTP_POST_VARS['message']) : '';
--		$privmsg_message = preg_replace('#<textarea>#si', '&lt;textarea&gt;', $privmsg_message);
-+		// $privmsg_message = preg_replace('#<textarea>#si', '&lt;textarea&gt;', $privmsg_message);
- 		if ( !$preview )
- 		{
- 			$privmsg_message = stripslashes($privmsg_message);
-@@ -1480,7 +1489,7 @@
- 			}
- 			
- 			$privmsg_message = str_replace('<br />', "\n", $privmsg_message);
--			$privmsg_message = preg_replace('#</textarea>#si', '&lt;/textarea&gt;', $privmsg_message);
-+			// $privmsg_message = preg_replace('#</textarea>#si', '&lt;/textarea&gt;', $privmsg_message);
- 
- 			$user_sig = ( $board_config['allow_sig'] ) ? (($privmsg['privmsgs_type'] == PRIVMSGS_NEW_MAIL) ? $user_sig : $privmsg['user_sig']) : '';
- 
-@@ -1523,7 +1532,7 @@
- 
- 				$privmsg_message = preg_replace("/\:(([a-z0-9]:)?)$privmsg_bbcode_uid/si", '', $privmsg_message);
- 				$privmsg_message = str_replace('<br />', "\n", $privmsg_message);
--				$privmsg_message = preg_replace('#</textarea>#si', '&lt;/textarea&gt;', $privmsg_message);
-+				// $privmsg_message = preg_replace('#</textarea>#si', '&lt;/textarea&gt;', $privmsg_message);
- 				$privmsg_message = preg_replace($orig_word, $replacement_word, $privmsg_message);
- 				
- 				$msg_date =  create_date($board_config['default_dateformat'], $privmsg['privmsgs_date'], $board_config['board_timezone']); 
-@@ -1650,6 +1659,7 @@
- 	//
- 	if ($error)
- 	{
-+		$privmsg_message = htmlspecialchars($privmsg_message);
- 		$template->set_filenames(array(
- 			'reg_header' => 'error_body.tpl')
- 		);

Deleted: trunk/phpbb2/patches/200_CVE-2006-6839.diff
===================================================================
--- trunk/phpbb2/patches/200_CVE-2006-6839.diff	2007-04-10 17:58:44 UTC (rev 369)
+++ trunk/phpbb2/patches/200_CVE-2006-6839.diff	2007-04-10 19:02:48 UTC (rev 370)
@@ -1,33 +0,0 @@
-diff -Nur phpBB2.0.21/includes/functions.php phpBB2/includes/functions.php
---- phpBB2.0.21/includes/functions.php	2006-06-09 16:29:41.000000000 +0200
-+++ phpBB2/includes/functions.php	2006-12-19 18:29:15.000000000 +0100
-@@ -917,7 +917,7 @@
- 		$db->sql_close();
- 	}
- 
--	if (strstr(urldecode($url), "\n") || strstr(urldecode($url), "\r"))
-+	if (strstr(urldecode($url), "\n") || strstr(urldecode($url), "\r") || strstr(urldecode($url), ';url'))
- 	{
- 		message_die(GENERAL_ERROR, 'Tried to redirect to potentially insecure url.');
- 	}
-diff -Nur phpBB2.0.21/login.php phpBB2/login.php
---- phpBB2.0.21/login.php	2006-06-09 16:29:42.000000000 +0200
-+++ phpBB2/login.php	2006-12-19 18:29:16.000000000 +0100
-@@ -123,7 +123,7 @@
- 				$redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&amp;', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : '';
- 				$redirect = str_replace('?', '&', $redirect);
- 
--				if (strstr(urldecode($redirect), "\n") || strstr(urldecode($redirect), "\r"))
-+				if (strstr(urldecode($redirect), "\n") || strstr(urldecode($redirect), "\r") || strstr(urldecode($redirect), ';url'))
- 				{
- 					message_die(GENERAL_ERROR, 'Tried to redirect to potentially insecure url.');
- 				}
-@@ -142,7 +142,7 @@
- 			$redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&amp;', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : "";
- 			$redirect = str_replace("?", "&", $redirect);
- 
--			if (strstr(urldecode($redirect), "\n") || strstr(urldecode($redirect), "\r"))
-+			if (strstr(urldecode($redirect), "\n") || strstr(urldecode($redirect), "\r") || strstr(urldecode($redirect), ';url'))
- 			{
- 				message_die(GENERAL_ERROR, 'Tried to redirect to potentially insecure url.');
- 			}

Deleted: trunk/phpbb2/patches/200_CVE-2006-6840.diff
===================================================================
--- trunk/phpbb2/patches/200_CVE-2006-6840.diff	2007-04-10 17:58:44 UTC (rev 369)
+++ trunk/phpbb2/patches/200_CVE-2006-6840.diff	2007-04-10 19:02:48 UTC (rev 370)
@@ -1,77 +0,0 @@
-diff -Nur phpBB2.0.21/groupcp.php phpBB2/groupcp.php
---- phpBB2.0.21/groupcp.php	2006-06-09 16:29:42.000000000 +0200
-+++ phpBB2/groupcp.php	2006-12-19 18:29:16.000000000 +0100
-@@ -148,6 +148,7 @@
- $cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : 0;
- 
- $start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
-+$start = ($start < 0) ? 0 : $start;
- 
- //
- // Default var values
-diff -Nur phpBB2.0.21/memberlist.php phpBB2/memberlist.php
---- phpBB2.0.21/memberlist.php	2006-06-09 16:29:43.000000000 +0200
-+++ phpBB2/memberlist.php	2006-12-19 18:29:16.000000000 +0100
-@@ -34,6 +34,7 @@
- //
- 
- $start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
-+$start = ($start < 0) ? 0 : $start;
- 
- if ( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
- {
-diff -Nur phpBB2.0.21/modcp.php phpBB2/modcp.php
---- phpBB2.0.21/modcp.php	2006-06-09 16:29:43.000000000 +0200
-+++ phpBB2/modcp.php	2006-12-19 18:29:16.000000000 +0100
-@@ -71,6 +71,7 @@
- // Continue var definitions
- //
- $start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
-+$start = ($start < 0) ? 0 : $start;
- 
- $delete = ( isset($HTTP_POST_VARS['delete']) ) ? TRUE : FALSE;
- $move = ( isset($HTTP_POST_VARS['move']) ) ? TRUE : FALSE;
-diff -Nur phpBB2.0.21/privmsg.php phpBB2/privmsg.php
---- phpBB2.0.21/privmsg.php	2006-06-09 16:29:43.000000000 +0200
-+++ phpBB2/privmsg.php	2006-12-19 18:29:16.000000000 +0100
-@@ -101,6 +102,7 @@
- }
- 
- $start = ( !empty($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
-+$start = ($start < 0) ? 0 : $start;
- 
- if ( isset($HTTP_POST_VARS[POST_POST_URL]) || isset($HTTP_GET_VARS[POST_POST_URL]) )
- {
-diff -Nur phpBB2.0.21/search.php phpBB2/search.php
---- phpBB2.0.21/search.php	2006-06-09 16:29:43.000000000 +0200
-+++ phpBB2/search.php	2006-12-19 18:29:16.000000000 +0100
-@@ -118,6 +118,7 @@
- }
- 
- $start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
-+$start = ($start < 0) ? 0 : $start;
- 
- $sort_by_types = array($lang['Sort_Time'], $lang['Sort_Post_Subject'], $lang['Sort_Topic_Title'], $lang['Sort_Author'], $lang['Sort_Forum']);
- 
-diff -Nur phpBB2.0.21/viewforum.php phpBB2/viewforum.php
---- phpBB2.0.21/viewforum.php	2006-06-09 16:29:43.000000000 +0200
-+++ phpBB2/viewforum.php	2006-12-19 18:29:16.000000000 +0100
-@@ -42,6 +42,7 @@
- }
- 
- $start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
-+$start = ($start < 0) ? 0 : $start;
- 
- if ( isset($HTTP_GET_VARS['mark']) || isset($HTTP_POST_VARS['mark']) )
- {
-diff -Nur phpBB2.0.21/viewtopic.php phpBB2/viewtopic.php
---- phpBB2.0.21/viewtopic.php	2006-06-09 16:29:43.000000000 +0200
-+++ phpBB2/viewtopic.php	2006-12-19 18:29:16.000000000 +0100
-@@ -46,6 +46,7 @@
- 
- 
- $start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
-+$start = ($start < 0) ? 0 : $start;
- 
- if (!$topic_id && !$post_id)
- {

Deleted: trunk/phpbb2/patches/200_CVE-2006-6841.diff
===================================================================
--- trunk/phpbb2/patches/200_CVE-2006-6841.diff	2007-04-10 17:58:44 UTC (rev 369)
+++ trunk/phpbb2/patches/200_CVE-2006-6841.diff	2007-04-10 19:02:48 UTC (rev 370)
@@ -1,130 +0,0 @@
-diff -Nur phpBB2.0.21/includes/usercp_register.php phpBB2/includes/usercp_register.php
---- phpBB2.0.21/includes/usercp_register.php	2006-06-09 16:29:41.000000000 +0200
-+++ phpBB2/includes/usercp_register.php	2006-12-19 18:29:15.000000000 +0100
-@@ -144,6 +144,7 @@
- 	$notifyreply = ( isset($HTTP_POST_VARS['notifyreply']) ) ? ( ($HTTP_POST_VARS['notifyreply']) ? TRUE : 0 ) : 0;
- 	$notifypm = ( isset($HTTP_POST_VARS['notifypm']) ) ? ( ($HTTP_POST_VARS['notifypm']) ? TRUE : 0 ) : TRUE;
- 	$popup_pm = ( isset($HTTP_POST_VARS['popup_pm']) ) ? ( ($HTTP_POST_VARS['popup_pm']) ? TRUE : 0 ) : TRUE;
-+	$sid = (isset($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : 0;
- 
- 	if ( $mode == 'register' )
- 	{
-@@ -253,6 +254,13 @@
- {
- 	include($phpbb_root_path . 'includes/usercp_avatar.'.$phpEx);
- 
-+	// session id check
-+	if ($sid == '' || $sid != $userdata['session_id'])
-+	{
-+		$error = true;
-+		$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Session_invalid'];
-+	}
-+
- 	$passwd_sql = '';
- 	if ( $mode == 'editprofile' )
- 	{
-@@ -893,6 +901,7 @@
- 	}
- 
- 	$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="coppa" value="' . $coppa . '" />';
-+	$s_hidden_fields .= '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />';
- 	if( $mode == 'editprofile' )
- 	{
- 		$s_hidden_fields .= '<input type="hidden" name="user_id" value="' . $userdata['user_id'] . '" />';
-diff -Nur phpBB2.0.21/language/lang_english/lang_main.php phpBB2/language/lang_english/lang_main.php
---- phpBB2.0.21/language/lang_english/lang_main.php	2006-06-09 16:29:42.000000000 +0200
-+++ phpBB2/language/lang_english/lang_main.php	2006-12-19 18:29:15.000000000 +0100
-@@ -1018,6 +1018,8 @@
- $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';
- 
-+$lang['Session_invalid'] = 'Invalid Session. Please resubmit the form.';
-+
- //
- // That's all, Folks!
- // -------------------------------------------------
-diff -Nur phpBB2.0.21/posting.php phpBB2/posting.php
---- phpBB2.0.21/posting.php	2006-06-09 16:29:43.000000000 +0200
-+++ phpBB2/posting.php	2006-12-19 18:29:16.000000000 +0100
-@@ -44,6 +44,7 @@
- }
- 
- $confirm = isset($HTTP_POST_VARS['confirm']) ? true : false;
-+$sid = (isset($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : 0;
- 
- $params = array('forum_id' => POST_FORUM_URL, 'topic_id' => POST_TOPIC_URL, 'post_id' => POST_POST_URL);
- while( list($var, $param) = @each($params) )
-@@ -431,6 +431,7 @@
- 	//
- 	$s_hidden_fields = '<input type="hidden" name="' . POST_POST_URL . '" value="' . $post_id . '" />';
- 	$s_hidden_fields .= ( $delete || $mode == "delete" ) ? '<input type="hidden" name="mode" value="delete" />' : '<input type="hidden" name="mode" value="poll_delete" />';
-+	$s_hidden_fields .= '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />';
- 
- 	$l_confirm = ( $delete || $mode == 'delete' ) ? $lang['Confirm_delete'] : $lang['Confirm_delete_poll'];
- 
-@@ -542,6 +543,12 @@
- 	$return_message = '';
- 	$return_meta = '';
- 
-+	// session id check
-+	if ($sid == '' || $sid != $userdata['session_id'])
-+	{
-+		$error_msg .= (!empty($error_msg)) ? '<br />' . $lang['Session_invalid'] : $lang['Session_invalid'];
-+	}
-+
- 	switch ( $mode )
- 	{
- 		case 'editpost':
-@@ -567,6 +574,11 @@
- 
- 		case 'delete':
- 		case 'poll_delete':
-+			if ($error_msg != '')
-+			{
-+				message_die(GENERAL_MESSAGE, $error_msg);
-+			}
-+
- 			delete_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id);
- 			break;
- 	}
-@@ -929,6 +941,7 @@
- }
- 
- $hidden_form_fields = '<input type="hidden" name="mode" value="' . $mode . '" />';
-+$hidden_form_fields .= '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />';
- 
- switch( $mode )
- {
-diff -Nur phpBB2.0.21/privmsg.php phpBB2/privmsg.php
---- phpBB2.0.21/privmsg.php	2006-06-09 16:29:43.000000000 +0200
-+++ phpBB2/privmsg.php	2006-12-19 18:29:16.000000000 +0100
-@@ -50,6 +50,7 @@
- $delete = ( isset($HTTP_POST_VARS['delete']) ) ? TRUE : 0;
- $delete_all = ( isset($HTTP_POST_VARS['deleteall']) ) ? TRUE : 0;
- $save = ( isset($HTTP_POST_VARS['save']) ) ? TRUE : 0;
-+$sid = (isset($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : 0;
- 
- $refresh = $preview || $submit_search;
- 
-@@ -1161,6 +1163,13 @@
- 
- 	if ( $submit )
- 	{
-+		// session id check
-+		if ($sid == '' || $sid != $userdata['session_id'])
-+		{
-+			$error = true;
-+			$error_msg .= ( ( !empty($error_msg) ) ? '<br />' : '' ) . $lang['Session_invalid'];
-+		}
-+
- 		if ( !empty($HTTP_POST_VARS['username']) )
- 		{
- 			$to_username = phpbb_clean_username($HTTP_POST_VARS['username']);
-@@ -1736,6 +1746,7 @@
- 
- 	$s_hidden_fields = '<input type="hidden" name="folder" value="' . $folder . '" />';
- 	$s_hidden_fields .= '<input type="hidden" name="mode" value="' . $mode . '" />';
-+	$s_hidden_fields .= '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />';
- 	if ( $mode == 'edit' )
- 	{
- 		$s_hidden_fields .= '<input type="hidden" name="' . POST_POST_URL . '" value="' . $privmsg_id . '" />';

Modified: trunk/phpbb2/po/templates.pot
===================================================================
--- trunk/phpbb2/po/templates.pot	2007-04-10 17:58:44 UTC (rev 369)
+++ trunk/phpbb2/po/templates.pot	2007-04-10 19:02:48 UTC (rev 370)
@@ -6,7 +6,7 @@
 #, fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: phpbb2 2.0.21-6\n"
+"Project-Id-Version: phpbb2 2.0.22-1\n"
 "Report-Msgid-Bugs-To: Jeroen van Wolffelaar <jeroen at wolffelaar.nl>\n"
 "POT-Creation-Date: 2006-10-01 13:15+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"





More information about the phpBB-l mailing list