diff --git a/src/applications/conduit/method/ConduitAPIMethod.php b/src/applications/conduit/method/ConduitAPIMethod.php index f8a9ec0a9d..281c8ed1e7 100644 --- a/src/applications/conduit/method/ConduitAPIMethod.php +++ b/src/applications/conduit/method/ConduitAPIMethod.php @@ -136,25 +136,6 @@ abstract class ConduitAPIMethod return str_replace('_', '.', $method_fragment); } - protected function validateHost($host) { - // NOTE: Compare domains only so we aren't sensitive to port specification - // or omission. - - $host = new PhutilURI($host); - $host = $host->getDomain(); - - $self = new PhutilURI(PhabricatorEnv::getURI('/')); - $self = $self->getDomain(); - - if ($self !== $host) { - throw new Exception( - "Your client is connecting to this install as '{$host}', but it is ". - "configured as '{$self}'. The client and server must use the exact ". - "same URI to identify the install. Edit your .arcconfig or ". - "phabricator/conf so they agree on the URI for the install."); - } - } - protected function formatStringConstants($constants) { foreach ($constants as $key => $value) { $constants[$key] = '"'.$value.'"'; diff --git a/src/applications/conduit/method/ConduitAPI_conduit_connect_Method.php b/src/applications/conduit/method/ConduitAPI_conduit_connect_Method.php index 5547ee37c6..351d9b4a8c 100644 --- a/src/applications/conduit/method/ConduitAPI_conduit_connect_Method.php +++ b/src/applications/conduit/method/ConduitAPI_conduit_connect_Method.php @@ -25,7 +25,7 @@ final class ConduitAPI_conduit_connect_Method extends ConduitAPIMethod { 'user' => 'optional string', 'authToken' => 'optional int', 'authSignature' => 'optional string', - 'host' => 'required string', + 'host' => 'deprecated', ); } @@ -56,8 +56,6 @@ final class ConduitAPI_conduit_connect_Method extends ConduitAPIMethod { protected function execute(ConduitAPIRequest $request) { - $this->validateHost($request->getValue('host')); - $client = $request->getValue('client'); $client_version = (int)$request->getValue('clientVersion'); $client_description = (string)$request->getValue('clientDescription'); diff --git a/src/applications/conduit/method/ConduitAPI_conduit_getcertificate_Method.php b/src/applications/conduit/method/ConduitAPI_conduit_getcertificate_Method.php index c4ffcf1895..d8db634c5b 100644 --- a/src/applications/conduit/method/ConduitAPI_conduit_getcertificate_Method.php +++ b/src/applications/conduit/method/ConduitAPI_conduit_getcertificate_Method.php @@ -39,8 +39,6 @@ final class ConduitAPI_conduit_getcertificate_Method extends ConduitAPIMethod { } protected function execute(ConduitAPIRequest $request) { - $this->validateHost($request->getValue('host')); - $failed_attempts = PhabricatorUserLog::loadRecentEventsFromThisIP( PhabricatorUserLog::ACTION_CONDUIT_CERTIFICATE_FAILURE, 60 * 5);