-
Notifications
You must be signed in to change notification settings - Fork 961
Description
Looks like IP addresses passed to lightning-cli through cln-plugin are interpreted as numbers instead of strings, making the plugin manager fail to parse them and, therefore, crashing the plugin.
This applies to all possible ways to pass the argument as long it is passed by itself, that is, by position and by key, but not formatted in a string with other values such as "id@ip:port".
Notice this does not only apply to IPs, but also to any value formatted like x.y.z where {x, y, z} x. as a number, no matter what comes after.
How to reproduce
This can be easily tested by passing an IP to lightning-cli using a plugin that uses the rustlang plugin library. You can find a minimal reproducible example at: https://github.com/sr-gi/cln-passip.
In order to reproduce this you simply need to add cln-passip as a plugin and call:
lightning-cli passip 1.2.3.4
Or any other combination of dotted values provided the expression has more than one dot.