Page MenuHomePhabricator

D9723.id23347.diff
No OneTemporary

D9723.id23347.diff

diff --git a/src/lint/linter/ArcanistChmodLinter.php b/src/lint/linter/ArcanistChmodLinter.php
--- a/src/lint/linter/ArcanistChmodLinter.php
+++ b/src/lint/linter/ArcanistChmodLinter.php
@@ -46,6 +46,13 @@
public function lintPath($path) {
if (is_executable($path)) {
if ($this->getEngine()->isBinaryFile($path)) {
+ if (function_exists('exif_imagetype') && @exif_imagetype($path)) {
+ $this->raiseLintAtPath(
+ self::LINT_INVALID_EXECUTABLE,
+ pht('Images should not be executable.'));
+ return;
+ }
+
// Path is a binary file, which makes it a valid executable.
return;
} else if ($this->getShebang($path)) {

File Metadata

Mime Type
text/plain
Expires
Mon, Mar 24, 2:57 PM (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7597010
Default Alt Text
D9723.id23347.diff (706 B)

Event Timeline