mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
lightningd: unescape JSON strings for db.
We were feeding in the raw JSON, which escapes \". Then we were escaping *again* to return it. Reported-by: @m-schmook Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Fixed: JSON-RPC: `datastore` handles escapes in `string` parameter correctly.
This commit is contained in:
committed by
Alex Myers
parent
15a744be8c
commit
9a77a995a8
@@ -136,7 +136,7 @@ static struct command_result *json_datastore(struct command *cmd,
|
||||
|
||||
if (!param(cmd, buffer, params,
|
||||
p_req("key", param_list_or_string, &key),
|
||||
p_opt("string", param_string, &strdata),
|
||||
p_opt("string", param_escaped_string, &strdata),
|
||||
p_opt("hex", param_bin_from_hex, &data),
|
||||
p_opt_def("mode", param_mode, &mode, DS_MUST_NOT_EXIST),
|
||||
p_opt("generation", param_u64, &generation),
|
||||
|
||||
Reference in New Issue
Block a user