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

This commit is contained in:
spacelord committed 2025-02-02 20:04:25 +01:00
1 parent fa26595797
commit d565497de1
1 file changed
+1 -1
+1 -1
View File
@@ -9,7 +9,7 @@ const schema_get = validator.object({
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),
count: validator.boolean()
}).nand('id', 'search'); // Allow id or search. not both.