From 4f56b52ed5a4a372e45e4a2e67f435a4b91f920f Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 21 Oct 2013 15:06:48 -0700 Subject: [PATCH] CRM-13550 - API - Improve validation of options --- api/v3/utils.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/v3/utils.php b/api/v3/utils.php index 5fa2be30b9..e8592987c8 100644 --- a/api/v3/utils.php +++ b/api/v3/utils.php @@ -656,9 +656,9 @@ function _civicrm_api3_get_options_from_params(&$params, $queryObject = FALSE, $ $options = array( - 'offset' => $offset, - 'sort' => $sort, - 'limit' => $limit, + 'offset' => CRM_Utils_Rule::integer($offset), + 'sort' => CRM_Utils_Rule::string($sort), + 'limit' => CRM_Utils_Rule::integer($limit), 'return' => !empty($returnProperties) ? $returnProperties : NULL, ); if (!$queryObject) { @@ -680,7 +680,7 @@ function _civicrm_api3_get_options_from_params(&$params, $queryObject = FALSE, $ } elseif (in_array($n, $otherVars)) {} else{ - $inputParams[$n] = $v; + $inputParams[$n] = CRM_Utils_Rule::string($v); } } $options['return'] = array_merge($returnProperties, $legacyreturnProperties); -- 2.25.1