Page MenuHomePhabricator

D9703.id23295.diff
No OneTemporary

D9703.id23295.diff

diff --git a/src/applications/conduit/method/ConduitAPIMethod.php b/src/applications/conduit/method/ConduitAPIMethod.php
--- a/src/applications/conduit/method/ConduitAPIMethod.php
+++ b/src/applications/conduit/method/ConduitAPIMethod.php
@@ -136,25 +136,6 @@
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
--- a/src/applications/conduit/method/ConduitAPI_conduit_connect_Method.php
+++ b/src/applications/conduit/method/ConduitAPI_conduit_connect_Method.php
@@ -25,7 +25,7 @@
'user' => 'optional string',
'authToken' => 'optional int',
'authSignature' => 'optional string',
- 'host' => 'required string',
+ 'host' => 'deprecated',
);
}
@@ -56,8 +56,6 @@
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
--- a/src/applications/conduit/method/ConduitAPI_conduit_getcertificate_Method.php
+++ b/src/applications/conduit/method/ConduitAPI_conduit_getcertificate_Method.php
@@ -39,8 +39,6 @@
}
protected function execute(ConduitAPIRequest $request) {
- $this->validateHost($request->getValue('host'));
-
$failed_attempts = PhabricatorUserLog::loadRecentEventsFromThisIP(
PhabricatorUserLog::ACTION_CONDUIT_CERTIFICATE_FAILURE,
60 * 5);

File Metadata

Mime Type
text/plain
Expires
Sun, Oct 20, 2:58 AM (4 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6728009
Default Alt Text
D9703.id23295.diff (2 KB)

Event Timeline