]> khamidou — GitHub mirrors - arcanist.git/commitdiff
From Arcanist, send 'host' to server for validation on setup workflows
authorepriestley <git@epriestley.com>
Tue, 5 Jul 2011 14:19:30 +0000 (07:19 -0700)
committerepriestley <git@epriestley.com>
Tue, 5 Jul 2011 17:10:28 +0000 (10:10 -0700)
Summary: This allows us to detect and complain about mismatched client and
server host identities. It causes some subtle and not-so-subtle problems if the
client and server don't agree on the install's primary URI.
Test Plan: Ran "arc install-certificate" and "arc list" against my local host
with intentionally bogus configs and was warned. Ran with normal configs and
everything worked.
Reviewed By: tuomaspelkonen
Reviewers: jungejason, llorca, tuomaspelkonen, aran
CC: aran, tuomaspelkonen
Differential Revision: 591

scripts/arcanist.php
src/workflow/install-certificate/ArcanistInstallCertificateWorkflow.php

index 472841787ac2b1e980a9f60a3d0d044fa939bdac..6263695356c658acab4bca13eab353320c1d0707 100755 (executable)
@@ -244,6 +244,7 @@ try {
           'clientDescription' => php_uname('n').':'.$description,
           'user'              => $user_name,
           'certificate'       => $certificate,
+          'host'              => $conduit_uri,
         ));
     } catch (ConduitClientException $ex) {
       if ($ex->getErrorCode() == 'ERR-NO-CERTIFICATE' ||
index e9cfe5c3f559d91161e912f28a31ffae081f4595..14c4128e93f5d1c4b444f9c6fa2beaf17591f44a 100644 (file)
@@ -101,6 +101,7 @@ EOTEXT
       'conduit.getcertificate',
       array(
         'token' => $token,
+        'host'  => $uri,
       ));
 
     $user = $info['username'];