Skip to content

Commit 15112c2

Browse files
rob006SychO9
authored andcommitted
Sanitize page in Tag (#4170)
1 parent 00ef0dd commit 15112c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extensions/tags/src/Content/Tag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function __invoke(Document $document, Request $request): Document
4141
$slug = Arr::pull($queryParams, 'slug');
4242
$sort = Arr::pull($queryParams, 'sort');
4343
$q = Arr::pull($queryParams, 'q', '');
44-
$page = Arr::pull($queryParams, 'page', 1);
44+
$page = max(1, intval(Arr::pull($queryParams, 'page')));
4545
$filters = Arr::pull($queryParams, 'filter', []);
4646

4747
$sortMap = $this->resource->sortMap();

0 commit comments

Comments
 (0)