From 147d8849966beccce82b45cac2638b7c1661b9c0 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 13 Jan 2021 11:38:45 +0100 Subject: [PATCH] Also avoid matching .git suffix in bitbucket URLs, refs #9590 --- src/Composer/Util/Git.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Util/Git.php b/src/Composer/Util/Git.php index ed6da6c80..434a9e0d5 100644 --- a/src/Composer/Util/Git.php +++ b/src/Composer/Util/Git.php @@ -122,7 +122,7 @@ class Git $errorMsg = $this->process->getErrorOutput(); } - } elseif (preg_match('{^https://(bitbucket\.org)/(.*)(?:\.git)?$}U', $url, $match)) { //bitbucket oauth + } elseif (preg_match('{^https://(bitbucket\.org)/(.*?)(?:\.git)?$}U', $url, $match)) { //bitbucket oauth $bitbucketUtil = new Bitbucket($this->io, $this->config, $this->process); if (!$this->io->hasAuthentication($match[1])) {