Improve mod_security warning
authorJackmcbarn <jackmcbarn@gmail.com>
Sat, 20 Sep 2014 15:29:05 +0000 (11:29 -0400)
committerJackmcbarn <jackmcbarn@gmail.com>
Sat, 20 Sep 2014 15:29:05 +0000 (11:29 -0400)
Make it detect mod_security2 as well, and make the warning message
scarier.

Bug: 39463
Change-Id: Ic8dbd8425299f60e9fc0b54ff1b9a9a991d24190

includes/installer/Installer.php
includes/installer/i18n/en.json

index f84ed00..d333355 100644 (file)
@@ -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() {
         * @return bool
         */
        protected function envCheckModSecurity() {
-               if ( self::apacheModulePresent( 'mod_security' ) ) {
+               if ( self::apacheModulePresent( 'mod_security' )
+                       || self::apacheModulePresent( 'mod_security2' ) ) {
                        $this->showMessage( 'config-mod-security' );
                }
 
                        $this->showMessage( 'config-mod-security' );
                }
 
index 1e1c2da..4857495 100644 (file)
@@ -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": "<strong>Warning:</strong> 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-apc": "[http://www.php.net/apc APC] is installed",
        "config-wincache": "[http://www.iis.net/download/WinCacheForPhp WinCache] is installed",
        "config-no-cache": "<strong>Warning:</strong> 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": "<strong>Warning:</strong> 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": "<strong>Warning:</strong> 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: <code>$1</code>.",
        "config-git-bad": "Git version control software not found.",
        "config-diff3-bad": "GNU diff3 not found.",
        "config-git": "Found the Git version control software: <code>$1</code>.",
        "config-git-bad": "Git version control software not found.",