handlersearch: Allow all characters by escaping FTS
Escape FTS queries by simply treating everything as string. Though this way a user cannot use operators, it's an improvement over how it was done before. Closes: #7
这个提交包含在:
@ -28,15 +28,6 @@ Response HandlerSearch::handleRequest(const Request &r)
|
||||
return errorResponse("Missing search term", "No search term supplied");
|
||||
}
|
||||
|
||||
for(int x : q)
|
||||
{
|
||||
if(!isalnum(x) && !isspace(x))
|
||||
{
|
||||
return errorResponse(
|
||||
"Invalid char",
|
||||
"Currently, the search is limited and so only supports alpha numeric characters and spaces");
|
||||
}
|
||||
}
|
||||
auto pageDao = this->database->createPageDao();
|
||||
QueryOption qo = queryOption(r);
|
||||
try
|
||||
|
在新工单中引用
屏蔽一个用户