jenkins-bot has submitted this change and it was merged.

Change subject: Check that file is executable in Installer::locateExecutable
......................................................................


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
---
M includes/installer/Installer.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Krinkle: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php
index 85b1013..ae1a2a7 100644
--- a/includes/installer/Installer.php
+++ b/includes/installer/Installer.php
@@ -1279,7 +1279,7 @@
                        $command = $path . DIRECTORY_SEPARATOR . $name;
 
                        MediaWiki\suppressWarnings();
-                       $file_exists = file_exists( $command );
+                       $file_exists = is_executable( $command );
                        MediaWiki\restoreWarnings();
 
                        if ( $file_exists ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/292187
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I705010b01cd3a17c3950eebae3066d7b007f706e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Waldir <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to