MaxSem has uploaded a new change for review.
https://gerrit.wikimedia.org/r/269882
Change subject: Remove register_globals and magic_quotes_* checks
......................................................................
Remove register_globals and magic_quotes_* checks
Yay, this crap is finally gone as of PHP 5.4!
Change-Id: I2cb01b5bf0fdde4c8cf5286ef6aff93ac45e99fd
---
M includes/WebStart.php
M includes/installer/Installer.php
M includes/installer/i18n/en.json
M includes/installer/i18n/qqq.json
4 files changed, 0 insertions(+), 48 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/82/269882/1
diff --git a/includes/WebStart.php b/includes/WebStart.php
index fb6c3e6..8e2fac2 100644
--- a/includes/WebStart.php
+++ b/includes/WebStart.php
@@ -26,14 +26,6 @@
* @file
*/
-# Die if register_globals is enabled (PHP <=5.3)
-# This must be done before any globals are set by the code
-if ( ini_get( 'register_globals' ) ) {
- die( 'MediaWiki does not support installations where register_globals
is enabled. Please see '
- . '<a
href="https://www.mediawiki.org/wiki/register_globals">mediawiki.org</a> '
- . 'for help on how to disable it.' );
-}
-
if ( function_exists( 'get_magic_quotes_gpc' ) && get_magic_quotes_gpc() ) {
die( 'MediaWiki does not function when magic quotes are enabled. Please
see the '
. '<a
href="https://php.net/manual/security.magicquotes.disabling.php">PHP Manual</a>
'
diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php
index 40e51f0..0ef2d47 100644
--- a/includes/installer/Installer.php
+++ b/includes/installer/Installer.php
@@ -116,9 +116,7 @@
*/
protected $envChecks = array(
'envCheckDB',
- 'envCheckRegisterGlobals',
'envCheckBrokenXML',
- 'envCheckMagicQuotes',
'envCheckMbstring',
'envCheckSafeMode',
'envCheckXML',
@@ -737,20 +735,6 @@
}
/**
- * Environment check for register_globals.
- * Prevent installation if enabled
- * @return bool
- */
- protected function envCheckRegisterGlobals() {
- if ( wfIniGetBool( 'register_globals' ) ) {
- $this->showMessage( 'config-register-globals-error' );
- return false;
- }
-
- return true;
- }
-
- /**
* Some versions of libxml+PHP break < and > encoding horribly
* @return bool
*/
@@ -763,22 +747,6 @@
}
return true;
- }
-
- /**
- * Environment check for magic_quotes_(gpc|runtime|sybase).
- * @return bool
- */
- protected function envCheckMagicQuotes() {
- $status = true;
- foreach ( array( 'gpc', 'runtime', 'sybase' ) as $magicJunk ) {
- if ( wfIniGetBool( "magic_quotes_$magicJunk" ) ) {
- $this->showError(
"config-magic-quotes-$magicJunk" );
- $status = false;
- }
- }
-
- return $status;
}
/**
diff --git a/includes/installer/i18n/en.json b/includes/installer/i18n/en.json
index 8d2040d..c6f3e1d 100644
--- a/includes/installer/i18n/en.json
+++ b/includes/installer/i18n/en.json
@@ -51,10 +51,6 @@
"config-no-db": "Could not find a suitable database driver! You need to
install a database driver for PHP.\nThe following database {{PLURAL:$2|type
is|types are}} supported: $1.\n\nIf you compiled PHP yourself, reconfigure it
with a database client enabled, for example, using <code>./configure
--with-mysqli</code>.\nIf you installed PHP from a Debian or Ubuntu package,
then you also need to install, for example, the <code>php5-mysql</code>
package.",
"config-outdated-sqlite": "<strong>Warning:</strong> you have SQLite
$1, which is lower than minimum required version $2. SQLite will be
unavailable.",
"config-no-fts3": "<strong>Warning:</strong> SQLite is compiled without
the [//sqlite.org/fts3.html FTS3 module], search features will be unavailable
on this backend.",
- "config-register-globals-error": "<strong>Error: PHP's
<code>[http://php.net/register_globals register_globals]</code> option is
enabled.\nIt must be disabled to continue with the installation.</strong>\nSee
[https://www.mediawiki.org/wiki/register_globals
https://www.mediawiki.org/wiki/register_globals] for help on how to do so.",
- "config-magic-quotes-gpc": "<strong>Fatal:
[http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc
magic_quotes_gpc] is active!</strong>\nThis option corrupts data input
unpredictably.\nYou cannot install or use MediaWiki unless this option is
disabled.",
- "config-magic-quotes-runtime": "<strong>Fatal:
[http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-runtime
magic_quotes_runtime] is active!'</strong>\nThis option corrupts data input
unpredictably.\nYou cannot install or use MediaWiki unless this option is
disabled.",
- "config-magic-quotes-sybase": "<strong>Fatal:
[http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-sybase
magic_quotes_sybase] is active!</strong>\nThis option corrupts data input
unpredictably.\nYou cannot install or use MediaWiki unless this option is
disabled.",
"config-mbstring": "<strong>Fatal:
[http://www.php.net/manual/en/ref.mbstring.php#mbstring.overload
mbstring.func_overload] is active!</strong>\nThis option causes errors and may
corrupt data unpredictably.\nYou cannot install or use MediaWiki unless this
option is disabled.",
"config-safe-mode": "<strong>Warning:</strong> PHP's
[http://www.php.net/features.safe-mode safe mode] is active.\nIt may cause
problems, particularly if using file uploads and <code>math</code> support.",
"config-xml-bad": "PHP's XML module is missing.\nMediaWiki requires
functions in this module and will not work in this configuration.\nYou may need
to install the php-xml RPM package.",
diff --git a/includes/installer/i18n/qqq.json b/includes/installer/i18n/qqq.json
index 372b228..80d5e3e 100644
--- a/includes/installer/i18n/qqq.json
+++ b/includes/installer/i18n/qqq.json
@@ -69,10 +69,6 @@
"config-no-db": "{{doc-important|Do not translate \"<code>./configure
--with-mysqli</code>\" and \"<code>php5-mysql</code>\".}}\nParameters:\n* $1 is
comma separated list of database types supported by MediaWiki.\n* $2 is the
count of items in $1 - for use in plural.",
"config-outdated-sqlite": "Used as warning. Parameters:\n* $1 - the
version of SQLite that has been installed\n* $2 - minimum version",
"config-no-fts3": "A \"[[:wikipedia:Front and back ends|backend]]\" is
a system or component that ordinary users don't interact with directly and
don't need to know about, and that is responsible for a distinct task or
service - for example, a storage back-end is a generic system for storing data
which other applications can use. Possible alternatives for back-end are
\"system\" or \"service\", or (depending on context and language) even leave it
untranslated.",
- "config-register-globals-error": "Error message in the MediaWiki
installer environment checks.",
- "config-magic-quotes-gpc": "{{Related|Config-fatal}}",
- "config-magic-quotes-runtime": "{{Related|Config-fatal}}",
- "config-magic-quotes-sybase": "{{Related|Config-fatal}}",
"config-mbstring": "{{Related|Config-fatal}}",
"config-safe-mode": "Status message in the MediaWiki installer
environment checks.",
"config-xml-bad": "Status message in the MediaWiki installer
environment checks.",
--
To view, visit https://gerrit.wikimedia.org/r/269882
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2cb01b5bf0fdde4c8cf5286ef6aff93ac45e99fd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits