summaryrefslogtreecommitdiff
path: root/config/Installer.php
diff options
context:
space:
mode:
Diffstat (limited to 'config/Installer.php')
-rw-r--r--config/Installer.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/config/Installer.php b/config/Installer.php
index 293a1a6c..f00a850d 100644
--- a/config/Installer.php
+++ b/config/Installer.php
@@ -25,6 +25,7 @@ if( !defined( 'MEDIAWIKI_INSTALL' ) ) {
error_reporting( E_ALL | E_STRICT );
header( "Content-type: text/html; charset=utf-8" );
+header( 'X-Frame-Options: DENY' );
@ini_set( "display_errors", true );
# In case of errors, let output be clean.
@@ -47,6 +48,8 @@ require_once( "$IP/includes/Exception.php" );
require_once( "$IP/includes/json/Services_JSON.php" );
require_once( "$IP/includes/json/FormatJson.php" );
+$wgMaxShellMemory = 0;
+
# If we get an exception, the user needs to know
# all the details
$wgShowExceptionDetails = true;
@@ -2148,7 +2151,7 @@ function locate_executable($loc, $names, $versioninfo = false) {
return $command;
$file = str_replace('$1', $command, $versioninfo[0]);
- if (strstr(`$file`, $versioninfo[1]) !== false)
+ if ( strstr( wfShellExec( $file ), $versioninfo[1]) !== false )
return $command;
}
}
@@ -2239,12 +2242,12 @@ function getShellLocale( $wikiLang ) {
# Get a list of available locales
$lines = $ret = false;
- exec( '/usr/bin/locale -a', $lines, $ret );
+ $lines = wfShellExec( '/usr/bin/locale -a', $ret, true );
if ( $ret ) {
return false;
}
- $lines = wfArrayMap( 'trim', $lines );
+ $lines = wfArrayMap( 'trim', explode( "\n", $lines ) );
$candidatesByLocale = array();
$candidatesByLang = array();
foreach ( $lines as $line ) {