From 997ef763b44758a1d0e126369a44aa4e23c65b02 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 24 Aug 2012 01:10:13 +0200 Subject: [PATCH] urlencode() github calls for safety, refs #935 --- src/Composer/Repository/Vcs/GitHubDriver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Repository/Vcs/GitHubDriver.php b/src/Composer/Repository/Vcs/GitHubDriver.php index a7526b8f2..58cfd82d9 100755 --- a/src/Composer/Repository/Vcs/GitHubDriver.php +++ b/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()) {