Use PHP7 constant expression instead of a magic number
authorMax Semenik <maxsem.wiki@gmail.com>
Thu, 31 May 2018 02:30:29 +0000 (19:30 -0700)
committerMax Semenik <maxsem.wiki@gmail.com>
Thu, 31 May 2018 02:43:04 +0000 (19:43 -0700)
Change-Id: I84e13dc6019c429359df3395f0731d17859be06c

includes/shell/Shell.php

index 742e142..3f10c11 100644 (file)
@@ -43,18 +43,6 @@ use MediaWiki\MediaWikiServices;
  */
 class Shell {
 
-       /**
-        * Apply a default set of restrictions for improved
-        * security out of the box.
-        *
-        * Equal to NO_ROOT | SECCOMP | PRIVATE_DEV | NO_LOCALSETTINGS
-        *
-        * @note This value will change over time to provide increased security
-        *       by default, and is not guaranteed to be backwards-compatible.
-        * @since 1.31
-        */
-       const RESTRICT_DEFAULT = 39;
-
        /**
         * Disallow any root access. Any setuid binaries
         * will be run without elevated access.
@@ -101,6 +89,17 @@ class Shell {
         */
        const NO_LOCALSETTINGS = 32;
 
+       /**
+        * Apply a default set of restrictions for improved
+        * security out of the box.
+        *
+        * @note This value will change over time to provide increased security
+        *       by default, and is not guaranteed to be backwards-compatible.
+        * @since 1.31
+        */
+       const RESTRICT_DEFAULT = self::NO_ROOT | self::SECCOMP | self::PRIVATE_DEV |
+                                                        self::NO_LOCALSETTINGS;
+
        /**
         * Don't apply any restrictions
         *