Skip to content

Commit

Permalink
fix: filter values are not validated (#3795)
Browse files Browse the repository at this point in the history
  • Loading branch information
SychO9 authored May 7, 2023
1 parent 6083fef commit 452f130
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Filter/MentionedFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,20 @@

use Flarum\Filter\FilterInterface;
use Flarum\Filter\FilterState;
use Flarum\Filter\ValidateFilterTrait;

class MentionedFilter implements FilterInterface
{
use ValidateFilterTrait;

public function getFilterKey(): string
{
return 'mentioned';
}

public function filter(FilterState $filterState, string $filterValue, bool $negate)
public function filter(FilterState $filterState, $filterValue, bool $negate)
{
$mentionedId = trim($filterValue, '"');
$mentionedId = $this->asInt($filterValue);

$filterState
->getQuery()
Expand Down

0 comments on commit 452f130

Please sign in to comment.