From d4fb7f578eac089eb611fe9239581631565e7cd5 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 13 Apr 2011 18:56:32 -0700 Subject: [PATCH] Allow new Conduit clients by default. Summary: There's no reason to default-reject clients since they can just pretend to be arc anyway. If they're speaking the right protocol, let them communicate over Conduit. Test Plan: Changed arc to identify as 'arczsdba', ran an arc command. Reviewed By: simpkins Reviewers: simpkins CC: simpkins Differential Revision: 132 --- .../conduit/connect/ConduitAPI_conduit_connect_Method.php | 3 ++- src/applications/conduit/method/conduit/connect/__init__.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/applications/conduit/method/conduit/connect/ConduitAPI_conduit_connect_Method.php b/src/applications/conduit/method/conduit/connect/ConduitAPI_conduit_connect_Method.php index 02b4712347..cfadd87066 100644 --- a/src/applications/conduit/method/conduit/connect/ConduitAPI_conduit_connect_Method.php +++ b/src/applications/conduit/method/conduit/connect/ConduitAPI_conduit_connect_Method.php @@ -102,7 +102,8 @@ class ConduitAPI_conduit_connect_Method extends ConduitAPIMethod { } break; default: - throw new ConduitException('ERR-UNKNOWN-CLIENT'); + // Allow new clients by default. + break; } $token = $request->getValue('authToken'); diff --git a/src/applications/conduit/method/conduit/connect/__init__.php b/src/applications/conduit/method/conduit/connect/__init__.php index 6906e56c9f..94a6716784 100644 --- a/src/applications/conduit/method/conduit/connect/__init__.php +++ b/src/applications/conduit/method/conduit/connect/__init__.php @@ -10,6 +10,7 @@ phutil_require_module('phabricator', 'applications/conduit/method/base'); phutil_require_module('phabricator', 'applications/conduit/protocol/exception'); phutil_require_module('phabricator', 'applications/conduit/storage/connectionlog'); phutil_require_module('phabricator', 'applications/people/storage/user'); +phutil_require_module('phabricator', 'infrastructure/env'); phutil_require_module('phabricator', 'storage/queryfx'); phutil_require_module('phutil', 'utils');