ToxicFrog / bltool

A tool for command line interaction with backloggery.com
Apache License 2.0
78 stars 9 forks source link

Support reading password from stdin or a file #33

Open rikai opened 6 years ago

rikai commented 6 years ago

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.

ToxicFrog commented 6 years ago

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 %?

ryliejamesthomas commented 5 years ago

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 #

ToxicFrog commented 5 years ago

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 '.

ryliejamesthomas commented 5 years ago

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)

ToxicFrog commented 5 years ago

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.

ryliejamesthomas commented 5 years ago

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!