CRM-13554 - validate values of limit and offset
[civicrm-core.git] / CRM / Core / BAO / PrevNextCache.php
index e1536ef996579daf7a9b4df2e1f93364052b48f3..0928b4435af36fe399d2fd7fc926220c34d3fdc7 100644 (file)
@@ -152,6 +152,9 @@ WHERE  cacheKey = %1
     }
 
     if ($rowCount) {
+      $offset = CRM_Utils_Type::escape($offset, 'Int');
+      $rowCount = CRM_Utils_Type::escape($rowCount, 'Int');
+
       $query .= " LIMIT {$offset}, {$rowCount}";
     }