Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"addpeer" command works with blank string #93

Closed
swissrouting opened this issue Jul 10, 2022 · 1 comment · Fixed by #131
Closed

"addpeer" command works with blank string #93

swissrouting opened this issue Jul 10, 2022 · 1 comment · Fixed by #131
Assignees
Labels
good first issue Good for newcomers

Comments

@swissrouting
Copy link

Example with CLN:

$ lightning-cli peerswap-addpeer
{
   "ReserveOnchainMsat": 0,
   "PeerAllowlist": [
      ""
   ],
   "AcceptAllPeers": false
}

Expected result: should see an error message like "peerswap-addpeer: missing argument for peer public key"

Actual result: successfully added an empty string to the PeerAllowlist.

@wtogami wtogami added the good first issue Good for newcomers label Jul 10, 2022
@wtogami
Copy link
Contributor

wtogami commented Jul 10, 2022

Good First Issue for someone who wants to get involved.

Suggested Fix:

  • Validate the input is 66 characters, hex, lowercase.

Don't bother to deal with invalid line entries. People can delete them manually from their policy.conf.

@nepet nepet linked a pull request Sep 28, 2022 that will close this issue
@nepet nepet self-assigned this Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants