From 873def9a99386db0adb78438774855955b0d9f74 Mon Sep 17 00:00:00 2001 From: Ori Livneh Date: Wed, 1 Jun 2016 10:42:34 -0700 Subject: [PATCH] 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 --- includes/installer/Installer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ) { -- 2.20.1