1
0
Fork 0

Use Authorization header instead of deprecated access_token query param, fixes #8454

pull/8580/head
Jordi Boggiano 2020-01-14 15:35:52 +01:00
parent be08638e40
commit 460c673cc4
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 1 additions and 1 deletions

View File

@ -277,7 +277,7 @@ class RemoteFilesystem
if (isset($options['github-token'])) { if (isset($options['github-token'])) {
// only add the access_token if it is actually a github URL (in case we were redirected to S3) // only add the access_token if it is actually a github URL (in case we were redirected to S3)
if (preg_match('{^https?://([a-z0-9-]+\.)*github\.com/}', $fileUrl)) { if (preg_match('{^https?://([a-z0-9-]+\.)*github\.com/}', $fileUrl)) {
$fileUrl .= (false === strpos($fileUrl, '?') ? '?' : '&') . 'access_token='.$options['github-token']; $options['http']['header'][] = 'Authorization: token '.$options['github-token'];
} }
unset($options['github-token']); unset($options['github-token']);
} }