Legoktm has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/387029 )
Change subject: Whitelist `application/x-dosexec` when run on Windows
......................................................................
Whitelist `application/x-dosexec` when run on Windows
On Windows, is_executable() returns true for all .exe files.
Whitelist their mime type on Windows only to avoid false positives,
as we still want them to be non-executable in Git.
Bug: T179224
Change-Id: If3a7a1ba37dc5f8cfad97cf978dfc51d31049086
---
M src/CheckCommand.php
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/minus-x
refs/changes/29/387029/1
diff --git a/src/CheckCommand.php b/src/CheckCommand.php
index 2955393..19840f6 100644
--- a/src/CheckCommand.php
+++ b/src/CheckCommand.php
@@ -147,6 +147,12 @@
return realpath( $path . '/' . $a );
}, $config['ignore'] );
}
+
+ if ( strtoupper( substr( PHP_OS, 0, 3 ) ) === 'WIN' ) {
+ // On Windows, is_executable() always returns true, so
whitelist those
+ // files
+ $this->whitelist[] = 'application/x-dosexec';
+ }
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/387029
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If3a7a1ba37dc5f8cfad97cf978dfc51d31049086
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/minus-x
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits