Page MenuHomePhorge

newOAuth1Future doesn't set a User-Agent
Open, Needs TriagePublic


It is good practice to always set a User-Agent.

While debugging why cloudflare was showing a captcha to Phorge, I realised it was because of lack of a captcha. I did exempt it from the rule but I don't see why a User-Agent shouldn't be added (and probably should be added to any other external http(s) requests)

Affected code is;cb934602c2e8c7da4b1c15793fe2511fe47c108d$102?as=source&blame=off

Event Timeline$57-58 uses a boring
$future->addHeader('User-Agent', __CLASS__); for this.

I wonder if both should use something like PhabricatorEnv::getEnvConfig('phabricator.base-uri'); instead.

That would probably be a better User-Agent