1
0
Fork 0

Add notice about not trying to allow path symlinks into source dir, refs #5974, refs #6174

pull/6213/merge
Jordi Boggiano 2017-03-06 16:17:49 +01:00
parent 70314f3570
commit f85a4a2f51
1 changed files with 4 additions and 0 deletions

View File

@ -46,6 +46,10 @@ class PathDownloader extends FileDownloader implements VcsCapableDownloaderInter
}
if (strpos(realpath($path) . DIRECTORY_SEPARATOR, $realUrl . DIRECTORY_SEPARATOR) === 0) {
// IMPORTANT NOTICE: If you wish to change this, don't. You are wasting your time and ours.
//
// Please see https://github.com/composer/composer/pull/5974 and https://github.com/composer/composer/pull/6174
// for previous attempts that were shut down because they did not work well enough or introduced too many risks.
throw new \RuntimeException(sprintf(
'Package %s cannot install to "%s" inside its source at "%s"',
$package->getName(), realpath($path), $realUrl