Skip to content

Commit 955a48e

Browse files
authored
Merge pull request from GHSA-jm6m-4632-36hf
1 parent b608b8e commit 955a48e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bin/composer

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
<?php
33

44
if (PHP_SAPI !== 'cli' && PHP_SAPI !== 'phpdbg') {
5+
if (0 === strpos(__FILE__, 'phar:') && ini_get('register_argc_argv')) {
6+
echo 'Composer cannot be run safely on non-CLI SAPIs with register_argc_argv=On. Aborting.'.PHP_EOL;
7+
exit(1);
8+
}
9+
510
echo 'Warning: Composer should be invoked via the CLI version of PHP, not the '.PHP_SAPI.' SAPI'.PHP_EOL;
611
}
712

0 commit comments

Comments
 (0)