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

Setting a Custom Browser configuration location presents the org.keepassxc.keepassxc_browser.json file as the database #8655

Closed
neildarlow opened this issue Oct 25, 2022 · 8 comments · Fixed by #8680

Comments

@neildarlow
Copy link

Overview

After updating to KeePassXC-2.7.3 it was necessary to set a Custom Browser configuration location for Firefox.
KeePassXC suggests ~/.config/mozilla/native-messaging-hosts which I had to change to /.mozilla/native-messaging-hosts.
On restarting KeePassXC my existing database (
/KeePassXC.kdbx) is replaced by the full path to org.keepassxc.keepassxc_browser.json.

Steps to Reproduce

  1. Update KeePassXC-2.7.1 to KeePassXC-2.7.3 (Flatpak version)
  2. Note that KeePassXC cannot connect to your database
  3. Set a Custom Browser configuration location to fix (2) - I used ~/.mozilla/native-messaging-hosts
  4. Quit KeePassXC and launch it again
  5. Your existing KeePassXC database choice has been replaced with the full path to org.keepassxc.keepassxc_browser.json
  6. Clear the Recent Databases entry and open your existing database successfully
  7. Close the database, Quit KeePassXC then launch it again
  8. A tab is presented for your existing database and another tab for the org.keepassxc.kaapassxc_browser.json file in the configured Custom Browser configuration location directory

Expected Behavior

Setting a Custom Browser configuration location should not affect any existing Database choice and should not present a configuration file as a Database.

Actual Behavior

Setting a Custom Browser configuration of e.g. ~/.mozilla/native-messaging-hosts presents ~/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json as the previously selected database

Context

fedora 37 Silverblue edition
Firefox-105.0.1 installed in base OS image as RPM

KeePassXC - Version 2.7.3
Revision: d8483d3
Distribution: Flatpak

Qt 5.15.6
Debugging mode is disabled.

Operating system: KDE Flatpak runtime
CPU architecture: x86_64
Kernel: linux 5.19.15-301.fc37.x86_64

Enabled extensions:

  • Auto-Type
  • Browser Integration
  • SSH Agent
  • KeeShare
  • YubiKey

Cryptographic libraries:

  • Botan 2.19.1

Operating System: Linux
Desktop Env: Gnome
Windowing System: Wayland

@neildarlow neildarlow added the bug label Oct 25, 2022
@droidmonkey
Copy link
Member

I don't understand what is happening to you at all, screenshot please

@neildarlow
Copy link
Author

neildarlow commented Oct 25, 2022

OK, I can't reproduce entirely what I described earlier but there's enough to show something is amiss.

Context:

  1. I have a KeePassXC database in my home directory named KeePassXC.kdbx
  2. My Firefox installation puts the KeePassXC native-messaging configuration in .mozilla/native-messaging-hosts/

Screenshot 1: What KeePassXC has as default (non-custom) native-messaging configuration
01-proposed-custom-browser-config-location

Screenshot 2: Custom native-messaging directory required for Firefox to communicate with KeePassXC
02-required-custom-browser-config-location

Screenshot 3: No existing database (from recents) so Open existing database selected - Notice proposed database path!
03-open-existing-database-clicked

Screenshot 4: Navigate away from the presented database path and select the existing database
04-navigate-and-select-existing-database

@neildarlow
Copy link
Author

And managed to recreate full problem. Manifested when Firefox launches KeePassXC during its startup.
erroneous-keepassxc-database

@varjolintu
Copy link
Member

@neildarlow Firefox launches KeePassXC..? This sounds like a bug in the Flatpak package. It should start the proxy instead and not the KeePassXC itself. Maybe the Custom Browser feature is not working properly with the Flatpak.

@neildarlow
Copy link
Author

Maybe I'm confused by terminology here. How does the KeePassXC Proxy differ from the KeyPassXC you would launch from a Desktop or Panel launcher icon?

To me the visuals are the same. If I launch KeePassXC from the Desktop/Panel I am able to select a previously existing database from the recents and then enter the password to unlock it.

Similarly, if I start Firefox without having previously launched KeePassXC the effect is to present the same dialog to select the database and provide the password to unlock it.

If the second behaviour is incorrect then it is what the Flatpak version of KeePassXC has always done in all the time I have been using it.

@droidmonkey
Copy link
Member

@neildarlow
Copy link
Author

Hi @droidmonkey,

Yes, I just saw that you had reported this. So, it has always exhibited this behaviour. The problems I describe in this issue have only shown themselves with KeePassXC-2.7.3 and the need for me to specify a Custom Browser Configuration location which, I believe, came about from a change in this release.

My question, I guess, is my bug report in any way valid? As a workaround I just have to make sure that I insert my YubiKey and launch KeePassXC to unlock the database before I start Firefox - which is a bit tedious.

@neildarlow
Copy link
Author

Thank you for this @droidmonkey. The solution is very elegant and works well.

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

Successfully merging a pull request may close this issue.

3 participants