1
0
Fork 0

Use rawurldecode instead of urldecode, fixes #7407

pull/7483/head
Jordi Boggiano 2018-07-20 11:44:54 +02:00
parent 28fdc842ee
commit 1983a450b4
3 changed files with 4 additions and 4 deletions

View File

@ -57,7 +57,7 @@ class Git
// capture username/password from URL if there is one
$this->process->execute('git remote -v', $output, $cwd);
if (preg_match('{^(?:composer|origin)\s+https?://(.+):(.+)@([^/]+)}im', $output, $match)) {
$this->io->setAuthentication($match[3], urldecode($match[1]), urldecode($match[2]));
$this->io->setAuthentication($match[3], rawurldecode($match[1]), rawurldecode($match[2]));
}
}

View File

@ -243,7 +243,7 @@ class RemoteFilesystem
// capture username/password from URL if there is one
if (preg_match('{^https?://([^:/]+):([^@/]+)@([^/]+)}i', $fileUrl, $match)) {
$this->io->setAuthentication($originUrl, urldecode($match[1]), urldecode($match[2]));
$this->io->setAuthentication($originUrl, rawurldecode($match[1]), rawurldecode($match[2]));
}
$tempAdditionalOptions = $additionalOptions;

View File

@ -109,9 +109,9 @@ final class StreamContextFactory
// handle proxy auth if present
if (isset($proxy['user'])) {
$auth = urldecode($proxy['user']);
$auth = rawurldecode($proxy['user']);
if (isset($proxy['pass'])) {
$auth .= ':' . urldecode($proxy['pass']);
$auth .= ':' . rawurldecode($proxy['pass']);
}
$auth = base64_encode($auth);