diff --git a/src/Composer/Downloader/GitDownloader.php b/src/Composer/Downloader/GitDownloader.php index 56b55629e..322d3f883 100644 --- a/src/Composer/Downloader/GitDownloader.php +++ b/src/Composer/Downloader/GitDownloader.php @@ -384,7 +384,7 @@ class GitDownloader extends VcsDownloader protected function sanitizeUrl($message) { - return preg_replace('{://(.+?):.+?@}', '://$1:***@', $message); + return preg_replace('{://([^@]+?):.+?@}', '://$1:***@', $message); } protected function setPushUrl(PackageInterface $package, $path)