You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lncli unlock --stdin will stop reading when it encounters its first newline, meaning that if your password has a newline in it, it will not be able to read it.
My suggestion is to read until EOF if it is coming in over stdin. The alternative is that we need a way to escape newlines so that lncli will propagate them instead of terminate on them.
Your environment
LND 0.13.0
Raspbian Buster
bitcoind 0.21.0
Steps to reproduce
use REST or GRPC to create a wallet password with a newline in it.
try and unlock wallet with cat pwd.txt | lncli unlock --stdin
observe incorrect password error
verify that password works by confirming over REST or GRPC
Expected behaviour
I'd expect that any password that can be created via any of the 3 interfaces would be usable on any of the 3 interfaces.
My recommendation is that if --stdin is set on lncli unlock that the stream is read until EOF rather than terminating on a newline as it does in the interactive mode.
Actual behaviour
Password is rejected because only a subset of it is read.
The text was updated successfully, but these errors were encountered:
This is quite a footgun from my experience. I almost permanently lost access to my sats once because of having non-ascii chars in password. Here's a oneliner that generates secure password easily: head -c 18 /dev/urandom | base64
Background
lncli unlock --stdin will stop reading when it encounters its first newline, meaning that if your password has a newline in it, it will not be able to read it.
My suggestion is to read until EOF if it is coming in over stdin. The alternative is that we need a way to escape newlines so that lncli will propagate them instead of terminate on them.
Your environment
Steps to reproduce
cat pwd.txt | lncli unlock --stdin
Expected behaviour
I'd expect that any password that can be created via any of the 3 interfaces would be usable on any of the 3 interfaces.
My recommendation is that if
--stdin
is set onlncli unlock
that the stream is read until EOF rather than terminating on a newline as it does in the interactive mode.Actual behaviour
Password is rejected because only a subset of it is read.
The text was updated successfully, but these errors were encountered: