Преглед на файлове

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.
Stefan Grootscholten преди 9 години
родител
ревизия
9b654048ed
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      src/Composer/Util/Git.php

+ 1 - 1
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])) {