1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-22 06:42:41 +01:00

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
This commit is contained in:
epriestley 2011-07-05 07:19:30 -07:00
parent 2892c6ef1a
commit 2aa853f85c
2 changed files with 2 additions and 0 deletions

View file

@ -244,6 +244,7 @@ try {
'clientDescription' => php_uname('n').':'.$description, 'clientDescription' => php_uname('n').':'.$description,
'user' => $user_name, 'user' => $user_name,
'certificate' => $certificate, 'certificate' => $certificate,
'host' => $conduit_uri,
)); ));
} catch (ConduitClientException $ex) { } catch (ConduitClientException $ex) {
if ($ex->getErrorCode() == 'ERR-NO-CERTIFICATE' || if ($ex->getErrorCode() == 'ERR-NO-CERTIFICATE' ||

View file

@ -101,6 +101,7 @@ EOTEXT
'conduit.getcertificate', 'conduit.getcertificate',
array( array(
'token' => $token, 'token' => $token,
'host' => $uri,
)); ));
$user = $info['username']; $user = $info['username'];