Problem
add_client_label, get_client_label and remove_client_label never do anything. Each query ends
with a stray single quote after FROM scope():
query = "SELECT label(client_id='" + client_id + "', labels=['" + label +"'], op='set') FROM scope()'"
Velociraptor does not run the statement: the action returns [], and the label is not set, checked
or removed.
Reproduce
- Call
add_client_label for a client and a new label. It returns [].
SELECT labels FROM clients(client_id='<client>'): the label is not there.
- Run the same query without the trailing
': the label is applied ({"ClientId": ..., "Labels": [...], "Op": "set"}).
Tested with app velociraptor/1.0.0 at b264148 against Velociraptor 0.77.3.
Fix
Remove the trailing ' in the three label queries. Happy to send a PR.
Problem
add_client_label,get_client_labelandremove_client_labelnever do anything. Each query endswith a stray single quote after
FROM scope():Velociraptor does not run the statement: the action returns
[], and the label is not set, checkedor removed.
Reproduce
add_client_labelfor a client and a new label. It returns[].SELECT labels FROM clients(client_id='<client>'): the label is not there.': the label is applied ({"ClientId": ..., "Labels": [...], "Op": "set"}).Tested with app
velociraptor/1.0.0at b264148 against Velociraptor 0.77.3.Fix
Remove the trailing
'in the three label queries. Happy to send a PR.