From ad41c324d3c473df1bdaabbac4ea4f08aabf1d73 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Wed, 12 Oct 2016 11:36:01 +0200 Subject: [PATCH] GitHub integrations generate access tokens containing a dot --- src/Composer/IO/BaseIO.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/IO/BaseIO.php b/src/Composer/IO/BaseIO.php index 98821629e..456bec9c4 100644 --- a/src/Composer/IO/BaseIO.php +++ b/src/Composer/IO/BaseIO.php @@ -100,7 +100,7 @@ abstract class BaseIO implements IOInterface, LoggerInterface } foreach ($githubOauth as $domain => $token) { - if (!preg_match('{^[a-z0-9]+$}', $token)) { + if (!preg_match('{^[.a-z0-9]+$}', $token)) { throw new \UnexpectedValueException('Your github oauth token for '.$domain.' contains invalid characters: "'.$token.'"'); } $this->checkAndSetAuthentication($domain, $token, 'x-oauth-basic');