----------------------------------------
* CRM-13554: Improve string validation in the query engine
http://issues.civicrm.org/jira/browse/CRM-13554
$sql .= ' GROUP BY contact_a.id';
}
if (!empty($sort)) {
+ $sort = CRM_Utils_Type::escape($sort, 'String');
$sql .= " ORDER BY $sort ";
}
if ($row_count > 0 && $offset >= 0) {
$orderBy = str_replace('sort_name', 'contact_a.sort_name', $orderBy);
}
+ $orderBy = CRM_Utils_Type::escape($orderBy, 'String');
$order = " ORDER BY $orderBy";
if ($sortOrder) {
+ $sortOrder = CRM_Utils_Type::escape($sortOrder, 'String');
$order .= " $sortOrder";
}