r75080 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75079‎ | r75080 | r75081 >
Date:09:56, 20 October 2010
Author:maxsem
Status:deferred
Tags:
Comment:
Backported r74918 to 1.16: installer should check whether it can exec safely before doing that
Modified paths:
  • /branches/REL1_16/phase3/RELEASE-NOTES (modified) (history)
  • /branches/REL1_16/phase3/config/Installer.php (modified) (history)

Diff [purge]

Index: branches/REL1_16/phase3/config/Installer.php
@@ -47,6 +47,8 @@
4848 require_once( "$IP/includes/json/Services_JSON.php" );
4949 require_once( "$IP/includes/json/FormatJson.php" );
5050
 51+$wgMaxShellMemory = 0;
 52+
5153 # If we get an exception, the user needs to know
5254 # all the details
5355 $wgShowExceptionDetails = true;
@@ -2148,7 +2150,7 @@
21492151 return $command;
21502152
21512153 $file = str_replace('$1', $command, $versioninfo[0]);
2152 - if (strstr(`$file`, $versioninfo[1]) !== false)
 2154+ if ( strstr( wfShellExec( $file ), $versioninfo[1]) !== false )
21532155 return $command;
21542156 }
21552157 }
@@ -2239,12 +2241,12 @@
22402242
22412243 # Get a list of available locales
22422244 $lines = $ret = false;
2243 - exec( '/usr/bin/locale -a', $lines, $ret );
 2245+ $lines = wfShellExec( '/usr/bin/locale -a', $ret, true );
22442246 if ( $ret ) {
22452247 return false;
22462248 }
22472249
2248 - $lines = wfArrayMap( 'trim', $lines );
 2250+ $lines = wfArrayMap( 'trim', explode( "\n", $lines ) );
22492251 $candidatesByLocale = array();
22502252 $candidatesByLang = array();
22512253 foreach ( $lines as $line ) {
Index: branches/REL1_16/phase3/RELEASE-NOTES
@@ -52,6 +52,8 @@
5353 as an alias for Special:Upload
5454 * (bug 25167) Correctly load JS fixes for IE6 (fixing a regression in 1.16.0)
5555 * (bug 25248) API: paraminfo errors with certain modules
 56+* Installer now handles situations when safe_mode is active or exec()
 57+ and similar functions are disabled better.
5658
5759 == Changes since 1.16 beta 3 ==
5860

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r74918* Revert r69013 (Use `` instead of wfShellExec() like the old installer). Thi...demon20:34, 17 October 2010

Status & tagging log