From 3c76e36e2c344718cae85466da4ae9fcc58c0298 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 28 Nov 2017 18:00:05 +0100 Subject: [PATCH] Fix regex, refs #6735 --- src/Composer/Util/RemoteFilesystem.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Util/RemoteFilesystem.php b/src/Composer/Util/RemoteFilesystem.php index bae3019a2..cc6709b48 100644 --- a/src/Composer/Util/RemoteFilesystem.php +++ b/src/Composer/Util/RemoteFilesystem.php @@ -224,7 +224,7 @@ class RemoteFilesystem $this->redirects = 1; // The first request counts. // capture username/password from URL if there is one - if (preg_match('{^https?://([^:]+):([^@]+)@([^/]+)}i', $fileUrl, $match)) { + if (preg_match('{^https?://([^:/]+):([^@/]+)@([^/]+)}i', $fileUrl, $match)) { $this->io->setAuthentication($originUrl, urldecode($match[1]), urldecode($match[2])); }