From 5c2b34a1af4b6e6ac93c8f5389369a9605051a92 Mon Sep 17 00:00:00 2001 From: Elendev Date: Tue, 17 Jul 2018 19:46:25 +0200 Subject: [PATCH] Encode the username correctly (fix typo) --- src/Composer/Util/Hg.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Util/Hg.php b/src/Composer/Util/Hg.php index 673ad783a..00ab3b8e8 100644 --- a/src/Composer/Util/Hg.php +++ b/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);