From 649acae6ac10978d627b71d0113f20483404993b Mon Sep 17 00:00:00 2001 From: athimm Date: Feb 28 2009 18:33:26 +0000 Subject: Update to 1.14.0, fixing sec. bug #485728, but also bug #485447. --- diff --git a/.cvsignore b/.cvsignore index 5f79e5d..375d390 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -mediawiki-1.13.4.tar.gz +mediawiki-1.14.0.tar.gz diff --git a/mediawiki-1.13.0-commoncode.patch b/mediawiki-1.13.0-commoncode.patch deleted file mode 100644 index 00504e9..0000000 --- a/mediawiki-1.13.0-commoncode.patch +++ /dev/null @@ -1,146 +0,0 @@ ---- ./includes/templates/NoLocalSettings.php.commoncode 2008-05-20 19:13:28.000000000 +0200 -+++ ./includes/templates/NoLocalSettings.php 2008-08-16 13:48:05.000000000 +0200 -@@ -42,7 +42,7 @@ -

MediaWiki

-
- config/LocalSettings.php to the parent directory.' ); - } else { - echo( "Please set up the wiki first." ); ---- ./includes/WebStart.php.commoncode 2008-06-16 22:21:26.000000000 +0200 -+++ ./includes/WebStart.php 2008-08-16 13:48:51.000000000 +0200 -@@ -84,7 +84,7 @@ - # LocalSettings.php is the per site customization file. If it does not exit - # the wiki installer need to be launched or the generated file moved from - # ./config/ to ./ --if( !file_exists( "$IP/LocalSettings.php" ) ) { -+if( !file_exists( "$DIR/LocalSettings.php" ) ) { - require_once( "$IP/includes/DefaultSettings.php" ); # used for printing the version - require_once( "$IP/includes/templates/NoLocalSettings.php" ); - die(); -@@ -94,7 +94,7 @@ - require_once( "$IP/includes/AutoLoader.php" ); - - # Include site settings. $IP may be changed (hopefully before the AutoLoader is invoked) --require_once( "$IP/LocalSettings.php" ); -+require_once( "$DIR/LocalSettings.php" ); - wfProfileOut( 'WebStart.php-conf' ); - - wfProfileIn( 'WebStart.php-ob_start' ); ---- ./maintenance/archives/upgradeWatchlist.php.commoncode 2008-07-11 00:00:04.000000000 +0200 -+++ ./maintenance/archives/upgradeWatchlist.php 2008-08-16 13:49:46.000000000 +0200 -@@ -15,7 +15,7 @@ - # Convert watchlists to new format - - global $IP; --require_once( "../LocalSettings.php" ); -+require_once( "$DIR/LocalSettings.php" ); - require_once( "$IP/Setup.php" ); - - $wgTitle = Title::newFromText( "Rebuild links script" ); ---- ./maintenance/update.php.commoncode 2008-07-19 14:15:07.000000000 +0200 -+++ ./maintenance/update.php 2008-08-16 13:48:05.000000000 +0200 -@@ -10,6 +10,9 @@ - * @ingroup Maintenance - */ - -+$DIR=getcwd(); -+chdir('/usr/share/mediawiki'); -+ - /** */ - $wgUseMasterForMaintenance = true; - $options = array( 'quick', 'nopurge' ); ---- ./maintenance/commandLine.inc.commoncode 2008-06-16 22:21:26.000000000 +0200 -+++ ./maintenance/commandLine.inc 2008-08-16 13:50:18.000000000 +0200 -@@ -182,7 +182,7 @@ - if ( isset( $options['conf'] ) ) { - $settingsFile = $options['conf']; - } else { -- $settingsFile = "$IP/LocalSettings.php"; -+ $settingsFile = "$DIR/LocalSettings.php"; - } - if ( isset( $options['wiki'] ) ) { - $bits = explode( '-', $options['wiki'] ); -@@ -208,7 +208,7 @@ - - $adminSettings = isset( $options['aconf'] ) - ? $options['aconf'] -- : "{$IP}/AdminSettings.php"; -+ : "{$DIR}/AdminSettings.php"; - if( is_readable( $adminSettings ) ) - require_once( $adminSettings ); - ---- ./config/index.php.commoncode 2008-07-20 16:29:04.000000000 +0200 -+++ ./config/index.php 2008-08-16 13:51:28.000000000 +0200 -@@ -19,6 +19,8 @@ - # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - # http://www.gnu.org/copyleft/gpl.html - -+$DIR=dirname( getcwd() ); -+chdir('/usr/share/mediawiki/config'); - error_reporting( E_ALL ); - header( "Content-type: text/html; charset=utf-8" ); - @ini_set( "display_errors", true ); -@@ -27,7 +29,7 @@ - $wgRequestTime = microtime( true ); - - # Attempt to set up the include path, to fix problems with relative includes --$IP = dirname( dirname( __FILE__ ) ); -+$IP = '/usr/share/mediawiki'; - define( 'MW_INSTALL_PATH', $IP ); - - # Define an entry point and include some files -@@ -209,18 +211,18 @@ - - /* Check for existing configurations and bug out! */ - --if( file_exists( "../LocalSettings.php" ) ) { -+if( file_exists( "$DIR/LocalSettings.php" ) ) { - $script = defined('MW_INSTALL_PHP5_EXT') ? 'index.php5' : 'index.php'; - dieout( "

Setup has completed, your wiki is configured.

-

Please delete the /config directory for extra security.

" ); - } - --if( file_exists( "./LocalSettings.php" ) ) { -+if( file_exists( "$DIR/LocalSettings.php" ) ) { - writeSuccessMessage(); - dieout( '' ); - } - --if( !is_writable( "." ) ) { -+if( !is_writable( $DIR . "/config" ) ) { - dieout( "

Can't write config file, aborting

- -

In order to configure the wiki you have to make the config subdirectory -@@ -1110,7 +1112,7 @@ - $localSettings = "<" . "?php$endl$local"; - // Fix up a common line-ending problem (due to CVS on Windows) - $localSettings = str_replace( "\r\n", "\n", $localSettings ); -- $f = fopen( "LocalSettings.php", 'xt' ); -+ $f = fopen( $DIR . "/config/LocalSettings.php", 'xt' ); - - if( $f == false ) { - print( "\n" ); -@@ -1633,7 +1635,7 @@ - if( defined( 'MW_INSTALL_PATH' ) ) { - \$IP = MW_INSTALL_PATH; - } else { -- \$IP = dirname( __FILE__ ); -+ \$IP = '/usr/share/mediawiki'; - } - - \$path = array( \$IP, \"\$IP/includes\", \"\$IP/languages\" ); ---- ./index.php.commoncode 2008-07-20 16:29:04.000000000 +0200 -+++ ./index.php 2008-08-16 13:48:05.000000000 +0200 -@@ -35,6 +35,9 @@ - */ - - -+$DIR=getcwd(); -+chdir('/usr/share/mediawiki'); -+ - # Initialise common code - $preIP = dirname( __FILE__ ); - require_once( "$preIP/includes/WebStart.php" ); diff --git a/mediawiki-1.14.0-commoncode.patch b/mediawiki-1.14.0-commoncode.patch new file mode 100644 index 0000000..4b925e5 --- /dev/null +++ b/mediawiki-1.14.0-commoncode.patch @@ -0,0 +1,145 @@ +--- mediawiki-1.14.0/includes/templates/NoLocalSettings.php.commoncode 2009-02-20 14:58:49.000000000 +0100 ++++ mediawiki-1.14.0/includes/templates/NoLocalSettings.php 2009-02-28 19:09:38.000000000 +0100 +@@ -61,7 +61,7 @@ +

MediaWiki

+
+ config/LocalSettings.php to the parent directory.' ); + } else { + echo( "Please set up the wiki first." ); +--- mediawiki-1.14.0/includes/WebStart.php.commoncode 2008-11-07 17:38:01.000000000 +0100 ++++ mediawiki-1.14.0/includes/WebStart.php 2009-02-28 19:10:12.000000000 +0100 +@@ -103,14 +103,14 @@ + # LocalSettings.php is the per site customization file. If it does not exit + # the wiki installer need to be launched or the generated file moved from + # ./config/ to ./ +- if( !file_exists( "$IP/LocalSettings.php" ) ) { ++ if( !file_exists( "$DIR/LocalSettings.php" ) ) { + require_once( "$IP/includes/DefaultSettings.php" ); # used for printing the version + require_once( "$IP/includes/templates/NoLocalSettings.php" ); + die(); + } + + # Include site settings. $IP may be changed (hopefully before the AutoLoader is invoked) +- require_once( "$IP/LocalSettings.php" ); ++ require_once( "$DIR/LocalSettings.php" ); + } + wfProfileOut( 'WebStart.php-conf' ); + +--- mediawiki-1.14.0/maintenance/archives/upgradeWatchlist.php.commoncode 2008-07-11 00:00:04.000000000 +0200 ++++ mediawiki-1.14.0/maintenance/archives/upgradeWatchlist.php 2009-02-28 19:09:38.000000000 +0100 +@@ -15,7 +15,7 @@ + # Convert watchlists to new format + + global $IP; +-require_once( "../LocalSettings.php" ); ++require_once( "$DIR/LocalSettings.php" ); + require_once( "$IP/Setup.php" ); + + $wgTitle = Title::newFromText( "Rebuild links script" ); +--- mediawiki-1.14.0/maintenance/update.php.commoncode 2008-07-19 14:15:07.000000000 +0200 ++++ mediawiki-1.14.0/maintenance/update.php 2009-02-28 19:09:38.000000000 +0100 +@@ -10,6 +10,9 @@ + * @ingroup Maintenance + */ + ++$DIR=getcwd(); ++chdir('/usr/share/mediawiki'); ++ + /** */ + $wgUseMasterForMaintenance = true; + $options = array( 'quick', 'nopurge' ); +--- mediawiki-1.14.0/maintenance/commandLine.inc.commoncode 2008-06-16 22:21:26.000000000 +0200 ++++ mediawiki-1.14.0/maintenance/commandLine.inc 2009-02-28 19:09:38.000000000 +0100 +@@ -182,7 +182,7 @@ + if ( isset( $options['conf'] ) ) { + $settingsFile = $options['conf']; + } else { +- $settingsFile = "$IP/LocalSettings.php"; ++ $settingsFile = "$DIR/LocalSettings.php"; + } + if ( isset( $options['wiki'] ) ) { + $bits = explode( '-', $options['wiki'] ); +@@ -208,7 +208,7 @@ + + $adminSettings = isset( $options['aconf'] ) + ? $options['aconf'] +- : "{$IP}/AdminSettings.php"; ++ : "{$DIR}/AdminSettings.php"; + if( is_readable( $adminSettings ) ) + require_once( $adminSettings ); + +--- mediawiki-1.14.0/config/index.php.commoncode 2009-02-20 15:17:47.000000000 +0100 ++++ mediawiki-1.14.0/config/index.php 2009-02-28 19:09:38.000000000 +0100 +@@ -19,6 +19,8 @@ + # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + # http://www.gnu.org/copyleft/gpl.html + ++$DIR=dirname( getcwd() ); ++chdir('/usr/share/mediawiki/config'); + error_reporting( E_ALL ); + header( "Content-type: text/html; charset=utf-8" ); + @ini_set( "display_errors", true ); +@@ -27,7 +29,7 @@ + $wgRequestTime = microtime( true ); + + # Attempt to set up the include path, to fix problems with relative includes +-$IP = dirname( dirname( __FILE__ ) ); ++$IP = '/usr/share/mediawiki'; + define( 'MW_INSTALL_PATH', $IP ); + + # Define an entry point and include some files +@@ -212,18 +214,18 @@ + + /* Check for existing configurations and bug out! */ + +-if( file_exists( "../LocalSettings.php" ) ) { ++if( file_exists( "$DIR/LocalSettings.php" ) ) { + $script = defined('MW_INSTALL_PHP5_EXT') ? 'index.php5' : 'index.php'; + dieout( "

Setup has completed, your wiki is configured.

+

Please delete the /config directory for extra security.

" ); + } + +-if( file_exists( "./LocalSettings.php" ) ) { ++if( file_exists( "$DIR/LocalSettings.php" ) ) { + writeSuccessMessage(); + dieout( '' ); + } + +-if( !is_writable( "." ) ) { ++if( !is_writable( $DIR . "/config" ) ) { + dieout( "

Can't write config file, aborting

+ +

In order to configure the wiki you have to make the config subdirectory +@@ -1133,7 +1135,7 @@ + $localSettings = "<" . "?php$endl$local"; + // Fix up a common line-ending problem (due to CVS on Windows) + $localSettings = str_replace( "\r\n", "\n", $localSettings ); +- $f = fopen( "LocalSettings.php", 'xt' ); ++ $f = fopen( $DIR . "/config/LocalSettings.php", 'xt' ); + + if( $f == false ) { + print( "\n" ); +@@ -1680,7 +1682,7 @@ + if( defined( 'MW_INSTALL_PATH' ) ) { + \$IP = MW_INSTALL_PATH; + } else { +- \$IP = dirname( __FILE__ ); ++ \$IP = '/usr/share/mediawiki'; + } + + \$path = array( \$IP, \"\$IP/includes\", \"\$IP/languages\" ); +--- mediawiki-1.14.0/index.php.commoncode 2008-12-28 16:17:21.000000000 +0100 ++++ mediawiki-1.14.0/index.php 2009-02-28 19:09:38.000000000 +0100 +@@ -35,6 +35,9 @@ + */ + + ++$DIR=getcwd(); ++chdir('/usr/share/mediawiki'); ++ + # Initialise common code + $preIP = dirname( __FILE__ ); + require_once( "$preIP/includes/WebStart.php" ); diff --git a/mediawiki.spec b/mediawiki.spec index b3e5044..32081a5 100644 --- a/mediawiki.spec +++ b/mediawiki.spec @@ -1,12 +1,12 @@ Summary: A wiki engine Name: mediawiki -Version: 1.13.4 +Version: 1.14.0 Release: 45%{?dist} License: GPLv2+ Group: Development/Tools URL: http://www.mediawiki.org/ -Source0: http://download.wikimedia.org/mediawiki/1.13/%{name}-%{version}.tar.gz -Patch0: mediawiki-1.13.0-commoncode.patch +Source0: http://download.wikimedia.org/mediawiki/1.14/%{name}-%{version}.tar.gz +Patch0: mediawiki-1.14.0-commoncode.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: ocaml >= 3.06 # to make sure the "apache" group is created before mediawiki is installed @@ -111,8 +111,8 @@ rm -rf %{buildroot} %changelog -* Wed Feb 25 2009 Fedora Release Engineering - 1.13.4-45 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild +* Sat Feb 28 2009 Axel Thimm - 1.14.0-45 +- Update to 1.14.0. * Sun Feb 22 2009 Axel Thimm - 1.13.4-44 - Split package up, so some users can decide to not install math diff --git a/sources b/sources index ff05081..e8e72b8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7673991af779008606da22a55921e315 mediawiki-1.13.4.tar.gz +36bfd924e92b61a6f5fe70c6bc8e5aac mediawiki-1.14.0.tar.gz