Skip to content
Snippets Groups Projects
Commit dd3a4117 authored by lobo's avatar lobo
Browse files

CRM-13554

----------------------------------------
* CRM-13554: Improve string validation in the query engine
  http://issues.civicrm.org/jira/browse/CRM-13554
parent c95d144e
No related branches found
No related tags found
No related merge requests found
......@@ -215,7 +215,7 @@ class CRM_Contact_Form_Search_Custom_ActivitySearch implements CRM_Contact_Form_
if ($rowcount > 0 && $offset >= 0) {
$offset = CRM_Utils_Type::escape($offset, 'Int');
$rowCount = CRM_Utils_Type::escape($rowCount, 'Int');
$rowcount = CRM_Utils_Type::escape($rowcount, 'Int');
$sql .= " LIMIT $offset, $rowcount ";
}
return $sql;
......
......@@ -134,7 +134,7 @@ class CRM_Contact_Form_Search_Custom_Base {
if ($rowcount > 0 && $offset >= 0) {
$offset = CRM_Utils_Type::escape($offset, 'Int');
$rowCount = CRM_Utils_Type::escape($rowCount, 'Int');
$rowcount = CRM_Utils_Type::escape($rowcount, 'Int');
$sql .= " LIMIT $offset, $rowcount ";
}
......
......@@ -148,7 +148,7 @@ $having
if ($rowcount > 0 && $offset >= 0) {
$offset = CRM_Utils_Type::escape($offset, 'Int');
$rowCount = CRM_Utils_Type::escape($rowCount, 'Int');
$rowcount = CRM_Utils_Type::escape($rowcount, 'Int');
$sql .= " LIMIT $offset, $rowcount ";
}
return $sql;
......
......@@ -160,7 +160,7 @@ class CRM_Contact_Form_Search_Custom_EventAggregate extends CRM_Contact_Form_Sea
if ($rowcount > 0 && $offset >= 0) {
$offset = CRM_Utils_Type::escape($offset, 'Int');
$rowCount = CRM_Utils_Type::escape($rowCount, 'Int');
$rowcount = CRM_Utils_Type::escape($rowcount, 'Int');
$sql .= " LIMIT $offset, $rowcount ";
}
......
......@@ -468,7 +468,7 @@ AND $mg.mailing_id = {$mailing_id}
$limitString = NULL;
if ($limit && $offset !== NULL) {
$offset = CRM_Utils_Type::escape($offset, 'Int');
$rowCount = CRM_Utils_Type::escape($rowCount, 'Int');
$limit = CRM_Utils_Type::escape($limit, 'Int');
$limitString = "LIMIT $offset, $limit";
}
......
......@@ -57,7 +57,7 @@ WHERE mailing_id = %1
$limitString = NULL;
if ($limit && $offset !== NULL) {
$offset = CRM_Utils_Type::escape($offset, 'Int');
$rowCount = CRM_Utils_Type::escape($rowCount, 'Int');
$limit = CRM_Utils_Type::escape($limit, 'Int');
$limitString = "LIMIT $offset, $limit";
}
......
......@@ -2490,7 +2490,7 @@ WHERE cg.extends IN ('" . implode("','", $this->_customGroupExtends) . "') AND
$offset = CRM_Utils_Type::escape($offset, 'Int');
$rowCount = CRM_Utils_Type::escape($rowCount, 'Int');
$this->_limit = " LIMIT $offset, " . $rowCount;
$this->_limit = " LIMIT $offset, $rowCount";
return array($offset, $rowCount);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment