Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2682496
D25758.1734661612.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
D25758.1734661612.diff
View Options
diff --git a/src/applications/auth/adapter/PhutilGitHubAuthAdapter.php b/src/applications/auth/adapter/PhutilGitHubAuthAdapter.php
--- a/src/applications/auth/adapter/PhutilGitHubAuthAdapter.php
+++ b/src/applications/auth/adapter/PhutilGitHubAuthAdapter.php
@@ -55,7 +55,8 @@
$future = new HTTPSFuture($uri);
// NOTE: GitHub requires a User-Agent string.
- $future->addHeader('User-Agent', __CLASS__);
+ $future->addHeader('User-Agent',
+ PhabricatorEnv::getEnvConfig('phabricator.base-uri'));
// See T13485. Circa early 2020, GitHub has deprecated use of the
// "access_token" URI parameter.
diff --git a/src/applications/auth/adapter/PhutilOAuth1AuthAdapter.php b/src/applications/auth/adapter/PhutilOAuth1AuthAdapter.php
--- a/src/applications/auth/adapter/PhutilOAuth1AuthAdapter.php
+++ b/src/applications/auth/adapter/PhutilOAuth1AuthAdapter.php
@@ -100,6 +100,8 @@
protected function newOAuth1Future($uri, $data = array()) {
$future = id(new PhutilOAuth1Future($uri, $data))
+ ->addHeader('User-Agent',
+ PhabricatorEnv::getEnvConfig('phabricator.base-uri'))
->setMethod('POST')
->setSignatureMethod($this->getSignatureMethod());
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 02:26 (18 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1015125
Default Alt Text
D25758.1734661612.diff (1 KB)
Attached To
Mode
D25758: Set base-uri as User-Agent for OAuth1 and Github authentication
Attached
Detach File
Event Timeline
Log In to Comment