From 311d9afb51f77747e132d4766eb80b93b52ccf11 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 6 May 2013 20:06:18 -0700 Subject: [PATCH] CRM_Utils_REST - Fix regression of "?q=civicrm/X/Y" --- CRM/Utils/REST.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/CRM/Utils/REST.php b/CRM/Utils/REST.php index 4cc8222217..8e55239a4e 100644 --- a/CRM/Utils/REST.php +++ b/CRM/Utils/REST.php @@ -261,12 +261,15 @@ class CRM_Utils_REST { if ($args[1] == 'ping') { return self::ping(); } + } else { + // or the new format (entity+action) + $args = array(); + $args[0] = 'civicrm'; + $args[1] = CRM_Utils_array::value('entity', $_REQUEST); + $args[2] = CRM_Utils_array::value('action', $_REQUEST); } - // or the new format (entity+action) - $args[1] = CRM_Utils_array::value('entity', $_REQUEST); - $args[2] = CRM_Utils_array::value('action', $_REQUEST); - + // Everyone should be required to provide the server key, so the whole // interface can be disabled in more change to the configuration file. // first check for civicrm site key @@ -600,6 +603,7 @@ class CRM_Utils_REST { if ($args[0] != 'civicrm') { return self::error('ERROR: Malformed REST path'); } + // Therefore we have reasonably well-formed "?q=civicrm/X/Y" } if (!CRM_Utils_System::authenticateKey(FALSE)) { -- 2.25.1