@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update GitHub API calls to use "Authorization" header instead of "access_token" URI parameter

Summary: Fixes T13485. GitHub has deprecated the "access_token" URI parameter for API authentication. Update to "Authorization: token ...".

Test Plan: Linked and unlinked a GitHub account locally.

Maniphest Tasks: T13485

Differential Revision: https://secure.phabricator.com/D20964

+5 -1
+5 -1
src/applications/auth/adapter/PhutilGitHubAuthAdapter.php
··· 51 51 52 52 protected function loadOAuthAccountData() { 53 53 $uri = new PhutilURI('https://api.github.com/user'); 54 - $uri->replaceQueryParam('access_token', $this->getAccessToken()); 55 54 56 55 $future = new HTTPSFuture($uri); 57 56 58 57 // NOTE: GitHub requires a User-Agent string. 59 58 $future->addHeader('User-Agent', __CLASS__); 59 + 60 + // See T13485. Circa early 2020, GitHub has deprecated use of the 61 + // "access_token" URI parameter. 62 + $token_header = sprintf('token %s', $this->getAccessToken()); 63 + $future->addHeader('Authorization', $token_header); 60 64 61 65 list($body) = $future->resolvex(); 62 66