Fix crash when using FullTextSearch with more then two asterisks in sequence. min(3) validation des the rest

This commit is contained in:
Leon Meier 2025-02-02 19:47:32 +01:00
parent fa26595797
commit d565497de1

View File

@ -9,7 +9,7 @@ const schema_get = validator.object({
skip: validator.number().min(0), skip: validator.number().min(0),
search: validator.string().min(3).max(20), // TODO: Check if * or ** or *** -> Due to crashes.. search: validator.string().min(3).max(20).regex(new RegExp('^(?!.*\\*{2,}).*$')), // TODO: Check if * or ** or *** -> Due to crashes..
id: validator.number().positive().precision(0), id: validator.number().positive().precision(0),
count: validator.boolean() count: validator.boolean()
}).nand('id', 'search'); // Allow id or search. not both. }).nand('id', 'search'); // Allow id or search. not both.