mirror of
https://github.com/composer/composer
synced 2025-05-09 08:32:56 +00:00
Only read first 500 bytes of a bin file to detect if it is a PHP script, refs #12032
This commit is contained in:
parent
6ec76db926
commit
68f6498bd3
1 changed files with 1 additions and 1 deletions
|
@ -213,7 +213,7 @@ class BinaryInstaller
|
|||
$binDir = ProcessExecutor::escape(dirname($binPath));
|
||||
$binFile = basename($binPath);
|
||||
|
||||
$binContents = file_get_contents($bin);
|
||||
$binContents = file_get_contents($bin, false, null, 0, 500);
|
||||
// For php files, we generate a PHP proxy instead of a shell one,
|
||||
// which allows calling the proxy with a custom php process
|
||||
if (Preg::isMatch('{^(#!.*\r?\n)?[\r\n\t ]*<\?php}', $binContents, $match)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue