browserpass-native
browserpass-native copied to clipboard
Check gopass default store location
General information
- Operating system + version: Arch Linux rolling
- Browser + version: Firefox 90.0.2
- Information about the host app:
- How did you install it? Installed via a package manager
- If installed an official release, put a version (
$ browserpass --version): 3.0.7
- Information about the browser extension:
- How did you install it? webstore
- Browserpass extension version as reported by your browser: 3.7.2
What should happen?
I would expect browserpass to also check the default password store location of gopass (~/.local/share/gopass/stores/root) by default.
What happened instead?
browserpass doesn't work out of the box with gopass' default store location. PASSWORD_STORE_DIR has to be set.
Makes sense, especially given that we explicitly say that browserpass works with pass and gopass 🙂
Would you like to take a stab at it?
This is the function to change:
https://github.com/browserpass/browserpass-native/blob/4d8abe1399967e4ca13389e7753422e13dd5418a/request/configure.go#L145
This is the gopass logic:
https://github.com/gopasspw/gopass/blob/d00c29a0e8e521eb32e4564998690430dcc7dbbc/pkg/appdir/appdir_xdg.go#L39-L50
I suppose the check should be done in this priority order (return earliest match):
$PASSWORD_STORE_DIR$GOPASS_HOMEDIR$HOME/.password-store$XDG_DATA_HOME/gopass/stores/root$HOME/.local/share/gopass/stores/root
If at some point the discussion linked in #95 settles, this priority list would be extended even further.