GitInfo: Don't try shelling out if it's disabled
authorKunal Mehta <legoktm@member.fsf.org>
Sun, 24 Jun 2018 20:55:43 +0000 (23:55 +0300)
committerKrinkle <krinklemail@gmail.com>
Sun, 8 Jul 2018 00:20:22 +0000 (00:20 +0000)
Bug: T198037
Change-Id: I364f9bc0e78439474101f4b2a171805c91f50a72
(cherry picked from commit d503ac7c9433a36358b1db27c6365167ea869832)

RELEASE-NOTES-1.31
includes/GitInfo.php

index f64c8fa..818308a 100644 (file)
@@ -11,6 +11,7 @@ This is a security and maintenance release of the MediaWiki 1.31 branch.
 * Special:BotPasswords now requires reauthentication.
 * (T191608, T187638) Add 'logid' parameter to Special:Log.
 * (T193829) Indicate when a Bot Password needs reset.
+* (T198037) GitInfo: Don't try shelling out if it's disabled.
 
 == MediaWiki 1.31 ==
 
index 6270b27..363d7b8 100644 (file)
@@ -227,6 +227,7 @@ class GitInfo {
                        $date = false;
                        if ( is_file( $wgGitBin ) &&
                                is_executable( $wgGitBin ) &&
+                               !Shell::isDisabled() &&
                                $this->getHead() !== false
                        ) {
                                $cmd = [