Skip to content

[1.x] fix(tags): sanitize page param in Tag#4170

Merged
imorland merged 1 commit intoflarum:1.xfrom
rob006:sanitize-page
Feb 10, 2025
Merged

[1.x] fix(tags): sanitize page param in Tag#4170
imorland merged 1 commit intoflarum:1.xfrom
rob006:sanitize-page

Conversation

@rob006
Copy link
Contributor

@rob006 rob006 commented Jan 27, 2025

Fix errors for requests like https://discuss.flarum.org/t/sandbox?page=%27nvOpzp;%20AND%201=1%20OR%20(%3C%27%22%3EiKO))

PHP Warning:  A non-numeric value encountered in vendor/flarum/tags/src/Content/Tag.php on line 84

Uses the same solution as in:

$page = max(1, intval(Arr::pull($queryParams, 'page')));

@rob006 rob006 requested a review from a team as a code owner January 27, 2025 20:17
@rob006 rob006 changed the title Sanitize page param in Tag [1.x] fix(tags): sanitize page param in Tag Jan 27, 2025
@imorland imorland added this to the 1.8.10 milestone Feb 10, 2025
@imorland imorland merged commit 9a43105 into flarum:1.x Feb 10, 2025
321 checks passed
@rob006 rob006 deleted the sanitize-page branch February 10, 2025 08:57
SychO9 pushed a commit that referenced this pull request Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants