mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-05-14 10:13:52 -04:00
Preventive measure against search ingestion (#8777)
We were not vulnerable to it, but here is an additional layer of security against search ingestions, in particular in public user queries, where someone could try to ingest a search like `) OR (interesting`
This commit is contained in:
committed by
GitHub
parent
d03efaed6b
commit
a1c637e7ac
@@ -24,6 +24,8 @@ class FreshRSS_BooleanSearch implements \Stringable {
|
||||
bool $expandUserQueries = true
|
||||
) {
|
||||
$input = trim($input);
|
||||
$input = ltrim($input, ' )');
|
||||
$input = rtrim($input, ' (\\');
|
||||
if ($input === '') {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user