Browse Source

Encode the username correctly (fix typo)

Elendev 6 years ago
parent
commit
5c2b34a1af
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Composer/Util/Hg.php

+ 1 - 1
src/Composer/Util/Hg.php

@@ -56,7 +56,7 @@ class Hg
         // Try with the authentication informations available
         if (preg_match('{^(https?)://((.+)(?:\:(.+))?@)?([^/]+)(/.*)?}mi', $url, $match) && $this->io->hasAuthentication($match[5])) {
             $auth = $this->io->getAuthentication($match[5]);
-            $authenticatedUrl = $match[1] . '://' . rawurldecode($auth['username']) . ':' . rawurlencode($auth['password']) . '@' . $match[5] . (!empty($match[6])? $match[6]: null);
+            $authenticatedUrl = $match[1] . '://' . rawurlencode($auth['username']) . ':' . rawurlencode($auth['password']) . '@' . $match[5] . (!empty($match[6])? $match[6]: null);
 
             $command = call_user_func($commandCallable, $authenticatedUrl);