mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-09 09:04:25 +01:00
JSON-RPC: Fix unquoted error string when parser fails
Fixes #963 Reported-by: @shesek Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
@@ -429,9 +429,8 @@ static void json_command_malformed(struct json_connection *jcon,
|
||||
const char *id,
|
||||
const char *error)
|
||||
{
|
||||
return connection_result(jcon, id, NULL, error,
|
||||
JSONRPC2_INVALID_REQUEST,
|
||||
NULL);
|
||||
return connection_result(jcon, id, NULL, tal_fmt(jcon, "\"%s\"", error),
|
||||
JSONRPC2_INVALID_REQUEST, NULL);
|
||||
}
|
||||
|
||||
static void parse_request(struct json_connection *jcon, const jsmntok_t tok[])
|
||||
|
||||
Reference in New Issue
Block a user