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.
cat pwd.txt | lncli unlock --stdinI'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.
Password is rejected because only a subset of it is read.