mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-11-01 05:27:45 +09:00
Escape search queries and add setting value on edit
This commit is contained in:
@@ -18,6 +18,9 @@ class SearchController extends Controller
|
||||
$requestprovider = $request->input('provider');
|
||||
$query = $request->input('q');
|
||||
|
||||
// Sanitize the query to prevent XSS
|
||||
$query = htmlspecialchars($query, ENT_QUOTES, 'UTF-8');
|
||||
|
||||
// Validate the presence and non-emptiness of the query parameter
|
||||
if (!$query || trim($query) === '') {
|
||||
abort(400, 'Missing or empty query parameter');
|
||||
|
||||
Reference in New Issue
Block a user