From 2aa853f85c44479bfe944e17da04d9c42efbadfc Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 5 Jul 2011 07:19:30 -0700 Subject: [PATCH] From Arcanist, send 'host' to server for validation on setup workflows 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 | 1 + .../install-certificate/ArcanistInstallCertificateWorkflow.php | 1 + 2 files changed, 2 insertions(+) diff --git a/scripts/arcanist.php b/scripts/arcanist.php index 47284178..62636953 100755 --- a/scripts/arcanist.php +++ b/scripts/arcanist.php @@ -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' || diff --git a/src/workflow/install-certificate/ArcanistInstallCertificateWorkflow.php b/src/workflow/install-certificate/ArcanistInstallCertificateWorkflow.php index e9cfe5c3..14c4128e 100644 --- a/src/workflow/install-certificate/ArcanistInstallCertificateWorkflow.php +++ b/src/workflow/install-certificate/ArcanistInstallCertificateWorkflow.php @@ -101,6 +101,7 @@ EOTEXT 'conduit.getcertificate', array( 'token' => $token, + 'host' => $uri, )); $user = $info['username']; -- 2.43.0