-
-
Notifications
You must be signed in to change notification settings - Fork 617
Open
Labels
Description
Bug Description:
If you make a multi-query request with a fuzzy search query to the /cli_json
endpoint , daemon replaces the semicolon in it with the \u0000
character before routing the request to Buddy.
curl localhost:9308/cli_json -d "CREATE TABLE t(f text) min_infix_len='2'"
[{"total":0,"error":"","warning":""}]
curl localhost:9308/cli_json -d "INSERT INTO t(f) values('abcdef')"
[{"total":1,"error":"","warning":""}]
curl localhost:9308/cli_json -d "SELECT f from t where match('abczef') option fuzzy=1; show meta";
{"error":"P01: syntax error, unexpected $end near 'option '"}
It can be seen in Buddy log that the request coming to Buddy is changed in comparison with the initial one, so Buddy fails to handle it:
request data: {"type":"unknown json request","error":{"message":"unknown option 'fuzzy'","body":{"error":"unknown option 'fuzzy'"}},"version":3,"message":{"path_query":"/cli_json","body":"SELECT f from t where match('abczef') option fuzzy=1\u0000 show meta","http_method":"POST"}}
Manticore Search Version:
Manticore 13.13.4 0bc5a9641@25101507 dev
Operating System Version:
Ubuntu 22.04
Have you tried the latest development version?
Yes
Internal Checklist:
To be completed by the assignee. Check off tasks that have been completed or are not applicable.
- Implementation completed
- Tests developed
- Documentation updated
- Documentation reviewed