From e4dbcc3580807705b98e407ec7be52163945195b Mon Sep 17 00:00:00 2001 From: Jackmcbarn Date: Sat, 20 Sep 2014 11:29:05 -0400 Subject: [PATCH] Improve mod_security warning Make it detect mod_security2 as well, and make the warning message scarier. Bug: 39463 Change-Id: Ic8dbd8425299f60e9fc0b54ff1b9a9a991d24190 --- includes/installer/Installer.php | 5 +++-- includes/installer/i18n/en.json | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index f84ed0005d..d3333558c7 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -898,11 +898,12 @@ abstract class Installer { } /** - * Scare user to death if they have mod_security + * Scare user to death if they have mod_security or mod_security2 * @return bool */ protected function envCheckModSecurity() { - if ( self::apacheModulePresent( 'mod_security' ) ) { + if ( self::apacheModulePresent( 'mod_security' ) + || self::apacheModulePresent( 'mod_security2' ) ) { $this->showMessage( 'config-mod-security' ); } diff --git a/includes/installer/i18n/en.json b/includes/installer/i18n/en.json index 1e1c2da7eb..4857495b62 100644 --- a/includes/installer/i18n/en.json +++ b/includes/installer/i18n/en.json @@ -70,7 +70,7 @@ "config-apc": "[http://www.php.net/apc APC] is installed", "config-wincache": "[http://www.iis.net/download/WinCacheForPhp WinCache] is installed", "config-no-cache": "Warning: Could not find [http://www.php.net/apc APC], [http://xcache.lighttpd.net/ XCache] or [http://www.iis.net/download/WinCacheForPhp WinCache].\nObject caching is not enabled.", - "config-mod-security": "Warning: Your web server has [http://modsecurity.org/ mod_security] enabled. If misconfigured, it can cause problems for MediaWiki or other software that allows users to post arbitrary content.\nRefer to [http://modsecurity.org/documentation/ mod_security documentation] or contact your host's support if you encounter random errors.", + "config-mod-security": "Warning: Your web server has [http://modsecurity.org/ mod_security]/mod_security2 enabled. Many common configurations of this will cause problems for MediaWiki and other software that allows users to post arbitrary content.\nIf possible, this should be disabled. Otherwise, refer to [http://modsecurity.org/documentation/ mod_security documentation] or contact your host's support if you encounter random errors.", "config-diff3-bad": "GNU diff3 not found.", "config-git": "Found the Git version control software: $1.", "config-git-bad": "Git version control software not found.", -- 2.20.1