ProtonMail / proton-bridge

Proton Mail Bridge application
GNU General Public License v3.0
1.14k stars 152 forks source link

bridge uses pass(1) even though "Helper" is "secret-service" #426

Open brunnre8 opened 11 months ago

brunnre8 commented 11 months ago

Expected Behavior

When the keychain helper is set to "secret-service" or "secret-service-dbus" all other helpers should not be tried

Current Behavior

All possible helpers are used in the setup, due to the isUsable() checks in init() of pkg/keychain/helper_linux.go

https://github.com/ProtonMail/proton-bridge/blob/384154c7678944d1bdafda21b1bf87f9db559d27/pkg/keychain/helper_linux.go#L75-L105

This messes up keychains that track history, in my case pass, as that adds multiple entries whenever the bridge starts. If the bridge has explicitly been told to use a certain keychain, all others should not be touched even if they seem to be available.

Possible Solution

Don't check for usability of helpers that are not configured if the user explicitly set a helper in the config

Steps to Reproduce

  1. Install pass, make it use the git integration
  2. configure the bridge to use the secret-service helper
  3. check the pass git log entries, you'll see a add + remove for every invocation of the bridge

Version Information

v3.4.2 (br-165)

LBeernaertProton commented 11 months ago

Thanks for the report. Internally tracked as GODT-2961.