Limit the length and parentheses nesting depth of a search query (#9277)

* Limit the length and parentheses nesting depth of a search query.

* Use exception

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
This commit is contained in:
AdamKorczandAlexandre Alapetite authored and GitHub committed 2026-09-09 16:12:41 +02:00
1 parent 970b135190
commit dc5cf8221b
7 files changed
+54 -1

No files matched your search

+1
View File
@@ -50,6 +50,7 @@ class FreshRSS_UserQuery {
* publishLabelsInsteadOfTags?:bool,description?:string,imageUrl?:string} $query
* @param array<FreshRSS_Category> $categories
* @param array<FreshRSS_Tag> $labels
* @throws Minz_BadRequestException if the search is too long or if the parentheses are nested too deeply
*/
public function __construct(array $query, array $categories, array $labels) {
$this->categories = [];