lastpass / lastpass-cli

LastPass command line interface tool
GNU General Public License v2.0
2.86k stars 290 forks source link

Fix bug where logout requires login #496

Closed waterkip closed 5 years ago

waterkip commented 5 years ago

lpass status asks the agent to see if we are logged in or not. The code for the logout bit checks the session and if a session has gone stale it want to refresh it. Implement a similar logic as in cmd-status.c where we ask the agent if we have a session, if we do, proceed as always, else, wipe all the session data that we can find. This removes the if-logic in session kill, to delete all config files even if they for whatever reason do not exist. Since we want to kill it, it seems logical to ignore these missing files.

Fixes: #477

Signed-off-by: Wesley Schwengle wesley@schwengle.net

cjnosal commented 5 years ago

I gave it a try, appears to work as expected.

waterkip commented 5 years ago

This has been working for me as well. I think this can be merged.