bltool icon indicating copy to clipboard operation
bltool copied to clipboard

Support reading password from stdin or a file

Open rikai opened this issue 7 years ago • 6 comments

Testing some stuff has shown me that logging in, at least on the backloggery side with a password that contains a % (at least as the last character) breaks bltool. The % is ignored and it tries to login without it.

This is a valid password character and should work, but doesn't.

rikai avatar May 21 '18 17:05 rikai

I can't see anything in the code that would affect this -- what shell are you using, and how are you quoting the password? Is it possible you're using a shell like zsh that assigns special meaning to %?

ToxicFrog avatar Jun 05 '18 14:06 ToxicFrog

Using a bash shell I also am having problems with at least one character. Had to change my password to get it to work.

I'm guessing it was " or #

ryliejamesthomas avatar Feb 09 '19 05:02 ryliejamesthomas

Same question -- are you properly quoting the password on the command line? If it has both " and # in it you'll need to quote the whole thing with '.

ToxicFrog avatar Feb 09 '19 11:02 ToxicFrog

Sorry, I should have mentioned, yes I'm putting it in quotes.

Checking again my password had a ' in it too, which might be the actual hiccup?

(it was easy enough to workaround with a less secure temporary password)

ryliejamesthomas avatar Feb 10 '19 01:02 ryliejamesthomas

Aah. Yeah, if it has both ' and " in it your only option is a mix of quotes and backslash-escapes. That's a shell issue, though, not a bltool one -- although it's one bltool could mitigate by supporting --password-from=file or --password-prompt.

ToxicFrog avatar Feb 10 '19 13:02 ToxicFrog

Oh true. Dunno about the issue @rikai 's perspective, but from mine I'm happy for you to mark this closed.

Grabbing a password from a file or a prompt would be great!

ryliejamesthomas avatar Feb 10 '19 13:02 ryliejamesthomas