1
0
Fork 0

Improve regex in \Composer\Repository\ComposerRepository::fetchFile() by removing unnecessary greedy operator

pull/8865/head
Ayesh Karunaratne 2020-05-04 00:38:31 +07:00
parent 1d077ede70
commit d4c8478df5
No known key found for this signature in database
GPG Key ID: 2CA18B2097A7429A
1 changed files with 1 additions and 1 deletions

View File

@ -997,7 +997,7 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
}
// url-encode $ signs in URLs as bad proxies choke on them
if (($pos = strpos($filename, '$')) && preg_match('{^https?://.*}i', $filename)) {
if (($pos = strpos($filename, '$')) && preg_match('{^https?://}i', $filename)) {
$filename = substr($filename, 0, $pos) . '%24' . substr($filename, $pos + 1);
}