Explorar o código

urlencode() github calls for safety, refs #935

Jordi Boggiano %!s(int64=13) %!d(string=hai) anos
pai
achega
997ef763b4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Composer/Repository/Vcs/GitHubDriver.php

+ 1 - 1
src/Composer/Repository/Vcs/GitHubDriver.php

@@ -127,7 +127,7 @@ class GitHubDriver extends VcsDriver
 
         if (!isset($this->infoCache[$identifier])) {
             try {
-                $resource = 'https://raw.github.com/'.$this->owner.'/'.$this->repository.'/'.$identifier.'/composer.json';
+                $resource = 'https://raw.github.com/'.$this->owner.'/'.$this->repository.'/'.urlencode($identifier).'/composer.json';
                 $composer = $this->getContents($resource);
             } catch (TransportException $e) {
                 if (404 !== $e->getCode()) {