Skip to content

Commit f3a8caf

Browse files
authored
Merge pull request #1162 from ytetsuro/fix/paginate-bug
Fixed insufficient validation of parameters related to pager.
2 parents 412e163 + 2dc9a8f commit f3a8caf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

system/Model.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ public function chunk($size = 100, \Closure $userFunc)
999999
public function paginate(int $perPage = 20, string $group = 'default')
10001000
{
10011001
// Get the necessary parts.
1002-
$page = isset($_GET['page']) && $_GET['page'] > 1 ? $_GET['page'] : 1;
1002+
$page = ctype_digit($_GET['page'] ?? '') && $_GET['page'] > 1 ? $_GET['page'] : 1;
10031003

10041004
$total = $this->countAllResults(false);
10051005

0 commit comments

Comments
 (0)