ElementsProject / ElementsProject/lightning
bug: `cln-plugin` cannot properly parse IP addresses
- Dominant language
- C
- Stars
- 3.1k
- Forks
- 1k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 13
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} $\in N$. The reason seems to be that the backend interprets `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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.