projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CRM-13554 - validate values of limit and offset
[civicrm-core.git]
/
CRM
/
Core
/
BAO
/
PrevNextCache.php
diff --git
a/CRM/Core/BAO/PrevNextCache.php
b/CRM/Core/BAO/PrevNextCache.php
index e1536ef996579daf7a9b4df2e1f93364052b48f3..0928b4435af36fe399d2fd7fc926220c34d3fdc7 100644
(file)
--- a/
CRM/Core/BAO/PrevNextCache.php
+++ b/
CRM/Core/BAO/PrevNextCache.php
@@
-152,6
+152,9
@@
WHERE cacheKey = %1
}
if ($rowCount) {
}
if ($rowCount) {
+ $offset = CRM_Utils_Type::escape($offset, 'Int');
+ $rowCount = CRM_Utils_Type::escape($rowCount, 'Int');
+
$query .= " LIMIT {$offset}, {$rowCount}";
}
$query .= " LIMIT {$offset}, {$rowCount}";
}