Skip to content

Commit

Permalink
runes: fix checkrune when method parameter is the empty string.
Browse files Browse the repository at this point in the history
This fix ElementsProject#6725.

Changelog-Fixed: fix `checkrune` when `method` parameter is the empty string.
  • Loading branch information
tonyaldon authored and vincenzopalazzo committed Oct 12, 2023
1 parent ebee48c commit ae94be4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lightningd/runes.c
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,10 @@ static struct command_result *json_checkrune(struct command *cmd,
cinfo.runes = cmd->ld->runes;
cinfo.peer = nodeid;
cinfo.buf = buffer;
cinfo.method = method;
if (method != NULL && streq(method, ""))
cinfo.method = NULL;
else
cinfo.method = method;
cinfo.params = methodparams;
cinfo.now = time_now();
strmap_init(&cinfo.cached_params);
Expand Down

0 comments on commit ae94be4

Please sign in to comment.