From 9b654048ed2c9966b1a7cc505cc52222656f0e96 Mon Sep 17 00:00:00 2001 From: Stefan Grootscholten Date: Sun, 1 May 2016 11:41:48 +0200 Subject: [PATCH] Fix regex for bitbucket https URLs. If the bitbucket URL has the .git extension, the compiling of the authUrl and sshUrl result in invalid URLs. --- 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 c90fde0b3..54abcb1b8 100644 --- a/src/Composer/Util/Git.php +++ b/src/Composer/Util/Git.php @@ -112,7 +112,7 @@ class Git return; } } - } elseif (preg_match('{^https://(bitbucket.org)/(.*)}', $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])) {