From: epriestley Date: Tue, 5 Jul 2011 14:19:30 +0000 (-0700) Subject: From Arcanist, send 'host' to server for validation on setup workflows X-Git-Tag: conduit-4~290 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=2aa853f85c44479bfe944e17da04d9c42efbadfc;p=arcanist.git 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 --- 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'];