vwxyzjn / portwarden

Create Encrypted Backups of Your Bitwarden Vault with Attachments
MIT License
587 stars 33 forks source link

BW_SESSION env var is not read #46

Open maxweisspoker opened 3 months ago

maxweisspoker commented 3 months ago

Even when the BW_SESSION env var is set, it is not read before the portwarden program attempts to run "bw unlock" or "bw login" in order to get a session variable. This is due to the function "BWGetSessionKey()" on line 159 of cmd/portwarden/portwarden.go calling BWUnlockVaultToGetSessionKey() before even attempting to look for a session key.

There are two currently open PRs which address this:

https://github.com/vwxyzjn/portwarden/pull/44/files

https://github.com/vwxyzjn/portwarden/pull/45/files