From 43c50a641d291a263689dbf6afc45428a2a13065 Mon Sep 17 00:00:00 2001 From: huangjx Date: Thu, 28 Oct 2021 15:03:47 +0800 Subject: [PATCH] sanitize search input --- lib/Controller/SearchController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Controller/SearchController.php b/lib/Controller/SearchController.php index cfd3169..c97de94 100644 --- a/lib/Controller/SearchController.php +++ b/lib/Controller/SearchController.php @@ -27,8 +27,8 @@ class SearchController extends Controller */ public function execute() { - $keyword = trim($this->request->getParam('text-input-value')); - $site = trim($this->request->getParam('select-value-search')); + $keyword = Helper::sanitize($this->request->getParam('text-input-value')); + $site = Helper::sanitize($this->request->getParam('select-value-search')); $this->search->setSite($site); $data = $this->search->go($keyword); $resp['title'] = ['title', 'seeders', 'info', 'actions'];