duritong / trocla

A password store for password creation and retrieval
Other
75 stars 18 forks source link

does't fail on missing password #57

Closed anarcat closed 3 years ago

anarcat commented 4 years ago

Trocla does not set a proper status code when it fails to find a password format. This is unexpected:

$ trocla delete test; echo $?
{}
0
$ trocla create test plain ; echo $?
XXXXXXXXXXXX
0
$ trocla get test bcrypt; echo $?
0

I would have expected the last command to give a non-zero return code.

(I would also expect delete to fail properly as well, for what it's worth.)

This makes it difficult to distinguish between "empty password" and "no password set", which should be distinguishable.

anarcat commented 3 years ago

thanks! :)