1
0
Fork 0

Encode the username correctly (fix typo)

pull/7475/head
Elendev 2018-07-17 19:46:25 +02:00
parent 1a725d5e1f
commit 5c2b34a1af
1 changed files with 1 additions and 1 deletions

View File

@ -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);