From: Ori Livneh Date: Wed, 1 Jun 2016 17:42:34 +0000 (-0700) Subject: Check that file is executable in Installer::locateExecutable X-Git-Tag: 1.31.0-rc.0~6737 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=873def9a99386db0adb78438774855955b0d9f74;p=lhc%2Fweb%2Fwiklou.git Check that file is executable in Installer::locateExecutable Just because the file exists doesn't mean that we can run. Use is_executable(), a one-shot check for both existence and executability. Change-Id: I705010b01cd3a17c3950eebae3066d7b007f706e --- diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index 85b1013049..ae1a2a72fc 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -1279,7 +1279,7 @@ abstract class Installer { $command = $path . DIRECTORY_SEPARATOR . $name; MediaWiki\suppressWarnings(); - $file_exists = file_exists( $command ); + $file_exists = is_executable( $command ); MediaWiki\restoreWarnings(); if ( $file_exists ) {