Adding a length check to query.
This commit is contained in:
parent
aa1956e1b8
commit
60470b9449
|
@ -93,7 +93,7 @@ fn search_query(
|
|||
) -> Result<Value, Error> {
|
||||
|
||||
let q = query.q.trim();
|
||||
if q.is_empty() || q == "*" {
|
||||
if q.is_empty() || q.len() <= 3 {
|
||||
return Err(format_err!("{{\"error\": \"{}\"}}", "Empty query".to_string()));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue