Skip to content

Commit

Permalink
Add notice about not trying to allow path symlinks into source dir, r…
Browse files Browse the repository at this point in the history
…efs #5974, refs #6174
  • Loading branch information
Seldaek committed Mar 6, 2017
1 parent 70314f3 commit f85a4a2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Composer/Downloader/PathDownloader.php
Expand Up @@ -46,6 +46,10 @@ public function download(PackageInterface $package, $path, $output = true)
}

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
Expand Down

0 comments on commit f85a4a2

Please sign in to comment.