Fix crash when using FullTextSearch with more then two asterisks in sequence. min(3) validation des the rest
This commit is contained in:
parent
fa26595797
commit
d565497de1
@ -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.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user