Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check gopass default store location #107

Open
cloudlena opened this issue Aug 2, 2021 · 1 comment
Open

Check gopass default store location #107

cloudlena opened this issue Aug 2, 2021 · 1 comment

Comments

@cloudlena
Copy link

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.

@maximbaz
Copy link
Member

maximbaz commented Aug 3, 2021

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:

func getDefaultPasswordStorePath() (string, error) {

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):

  1. $PASSWORD_STORE_DIR
  2. $GOPASS_HOMEDIR
  3. $HOME/.password-store
  4. $XDG_DATA_HOME/gopass/stores/root
  5. $HOME/.local/share/gopass/stores/root

If at some point the discussion linked in #95 settles, this priority list would be extended even further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants