mirror of
https://github.com/flarum/core.git
synced 2025-08-20 07:11:31 +02:00
fix: filter values are not validated (#3795)
This commit is contained in:
@@ -11,17 +11,20 @@ namespace Flarum\Likes\Query;
|
||||
|
||||
use Flarum\Filter\FilterInterface;
|
||||
use Flarum\Filter\FilterState;
|
||||
use Flarum\Filter\ValidateFilterTrait;
|
||||
|
||||
class LikedByFilter implements FilterInterface
|
||||
{
|
||||
use ValidateFilterTrait;
|
||||
|
||||
public function getFilterKey(): string
|
||||
{
|
||||
return 'likedBy';
|
||||
}
|
||||
|
||||
public function filter(FilterState $filterState, string $filterValue, bool $negate)
|
||||
public function filter(FilterState $filterState, $filterValue, bool $negate)
|
||||
{
|
||||
$likedId = trim($filterValue, '"');
|
||||
$likedId = $this->asInt($filterValue);
|
||||
|
||||
$filterState
|
||||
->getQuery()
|
||||
|
Reference in New Issue
Block a user