Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13972187
D9703.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D9703.id.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Oct 18 2024, 5:34 PM (4 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6728009
Default Alt Text
D9703.id.diff (2 KB)
Attached To
Mode
D9703: Don't validate Conduit hosts
Attached
Detach File
Event Timeline
Log In to Comment