browserpass / browserpass-legacy

Legacy Browserpass repo, development is now happening at:

Home Page:https://github.com/browserpass/browserpass-extension

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Firefox not prompting for passphrase

JoakimLofgren opened this issue · comments

General information

  • Operating system + version: Ubuntu 18.04.1
  • Browser + version: Firefox 61.0.1 (64bit)
  • Information about the host app:
    • How did you install it?
      I installed the pre-built binary (from the github releases page)
    • If installed an official release, put a version:
      $ ./browserpass-linux64 -v
      Browserpass host app version: 2.0.22
      
  • Information about the browser extension:

Exact steps to reproduce the problem

  1. Ensure pass/gpg needs password to unlock key
  2. Go to a login page you have credentials for
  3. Ctrl + Shift + L and press enter (or click the browserpass icon and the fill form )

What should happen?

It should prompt for my passphrase

What happened instead?

Nothing

Additional info

browser console has:

11:42:06.605 exit status 2
gpg: decryption failed: No secret key
background.js:70:13
11:42:06.605 stderr output from native app com.dannyvankooten.browserpass: [Browserpass] 2018/08/17 11:42:06 exit status 2
11:42:06.605 stderr output from native app com.dannyvankooten.browserpass: gpg: decryption failed: No secret key
$ gpg --version
gpg (GnuPG) 2.2.4
libgcrypt 1.8.1
...

Installing it for Chrome works, but not in Firefox.

It suggests to me that pinentry is somehow misbehaving or not properly configured, I wish I could help, but it doesn't sound like browserpass issue - for example it works for me.

See if some suggestions here could give you extra information: #266

Is there a way to call the browserpass binary manually with what Firefox tries to send?
Enable debug output or constructing the input myself?

Yeah, the binary accepts input data via stdin in the following format:

First 64 bit represent the length of the input data in little endian format, then comes the data itself. We have a wrapper that calculates the length and prepends it in the correct format: https://github.com/browserpass/native.pl

But be aware, Firefox and Chrome call binary in exactly the same way, in fact we have one shared source code for both browsers:

https://github.com/browserpass/browserpass/blob/1f64fc94457f0f915eb87adbf044f51dd22f9202/chrome/background.browserify.js#L57-L59

It could be a bug in how Firefox treats chrome.runtime.sendNativeMessage call, but I've just double-checked yet again and it works for me in Firefox (I'm on Arch Linux running FF 61.0.2 (64-bit)).

Closing as it seems there's nothing I can do, ping me if you find more details and especially if you discover that this is something we can fix in our code.

Just an idea, make sure pinentry application is properly configured in gpg-agent.conf, see this section of documentation for more info: https://github.com/browserpass/browserpass-native/#hints-for-configuring-gpg