@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.

Don't validate Conduit hosts

Summary:
(See rPd1d3bf4e / rPf371c7b3.) Just get rid of this logic, I don't think there's any value to it.

IIRC, this was added a long time ago to deal with some issues that users had configuring things, but I think modern Phabricator covers all this stuff and I haven't seen any confusion from users for a year or more.

(Generally, I want to generally make Conduit easier to use, and this makes it more difficult.)

Test Plan: `grep`

Reviewers: joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

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

+1 -24
-19
src/applications/conduit/method/ConduitAPIMethod.php
··· 136 136 return str_replace('_', '.', $method_fragment); 137 137 } 138 138 139 - protected function validateHost($host) { 140 - // NOTE: Compare domains only so we aren't sensitive to port specification 141 - // or omission. 142 - 143 - $host = new PhutilURI($host); 144 - $host = $host->getDomain(); 145 - 146 - $self = new PhutilURI(PhabricatorEnv::getURI('/')); 147 - $self = $self->getDomain(); 148 - 149 - if ($self !== $host) { 150 - throw new Exception( 151 - "Your client is connecting to this install as '{$host}', but it is ". 152 - "configured as '{$self}'. The client and server must use the exact ". 153 - "same URI to identify the install. Edit your .arcconfig or ". 154 - "phabricator/conf so they agree on the URI for the install."); 155 - } 156 - } 157 - 158 139 protected function formatStringConstants($constants) { 159 140 foreach ($constants as $key => $value) { 160 141 $constants[$key] = '"'.$value.'"';
+1 -3
src/applications/conduit/method/ConduitAPI_conduit_connect_Method.php
··· 25 25 'user' => 'optional string', 26 26 'authToken' => 'optional int', 27 27 'authSignature' => 'optional string', 28 - 'host' => 'required string', 28 + 'host' => 'deprecated', 29 29 ); 30 30 } 31 31 ··· 55 55 } 56 56 57 57 protected function execute(ConduitAPIRequest $request) { 58 - 59 - $this->validateHost($request->getValue('host')); 60 58 61 59 $client = $request->getValue('client'); 62 60 $client_version = (int)$request->getValue('clientVersion');
-2
src/applications/conduit/method/ConduitAPI_conduit_getcertificate_Method.php
··· 39 39 } 40 40 41 41 protected function execute(ConduitAPIRequest $request) { 42 - $this->validateHost($request->getValue('host')); 43 - 44 42 $failed_attempts = PhabricatorUserLog::loadRecentEventsFromThisIP( 45 43 PhabricatorUserLog::ACTION_CONDUIT_CERTIFICATE_FAILURE, 46 44 60 * 5);