From: Ayesh Karunaratne <ayesh@aye.sh>
Date: Sun, 7 Mar 2021 00:40:32 +0700
Subject: Update GitHub token pattern

GitHub is updating the format of auth tokens from `a-z0-9` to `A-Za-z0-9` ([notice](https://github.blog/changelog/2021-03-04-authentication-token-format-updates/)).
I'm not sure why `.` is allowed, but I dare not to remove it. In this PR, the token validation regex is updated to allow `A-Za-z0-9` instead of the current all lower-case `a-z` and disallowed `_`.

Origin: upstream, https://github.com/composer/composer/commit/dc83ba93f3d8a35629f9a387632e8cd373a144d0
Bug-Debian: https://bugs.debian.org/989315
---
 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 e66360e..9c8bf70 100644
--- a/src/Composer/IO/BaseIO.php
+++ b/src/Composer/IO/BaseIO.php
@@ -124,7 +124,7 @@ abstract class BaseIO implements IOInterface
         }
 
         foreach ($githubOauth as $domain => $token) {
-            if (!preg_match('{^[.a-z0-9]+$}', $token)) {
+            if (!preg_match('{^[.A-Za-z0-9_]+$}', $token)) {
                 throw new \UnexpectedValueException('Your github oauth token for '.$domain.' contains invalid characters: "'.$token.'"');
             }
             $this->checkAndSetAuthentication($domain, $token, 'x-oauth-basic');
