mirror of
https://github.com/flarum/core.git
synced 2025-08-22 08:04:37 +02:00
fix: filter values are not validated (#3795)
This commit is contained in:
@@ -11,17 +11,20 @@ namespace Flarum\Mentions\Filter;
|
||||
|
||||
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()
|
||||
|
Reference in New Issue
Block a user