keepassxc icon indicating copy to clipboard operation
keepassxc copied to clipboard

Credentials not returned when unconnected database is in focus

Open garymoon opened this issue 5 years ago • 30 comments

Thank you for KeePassXC-Browser! :blue_heart:

Expected Behavior

When I have multiple databases, and my browser is connected to a subset of them, the extension should search the ones it is attached to regardless of which is in focus in KeePassXC.

Current Behavior

I have multiple databases. I use several instances of Firefox and connect each to one database. If the database for the browser I'm using is not in focus in KeePassXC, KeePassXC-browser reports no logins found. If the relevant database is in focus, it works as expected.

Steps to Reproduce (for bugs)

  1. Open multiple databases in KeePassXC and unlock them (ensure they are not copies/clones, and that "Search in all opened databases for matching credentials" is checked)
  2. Connect one of them to a browser instance
  3. Save a credential in this database
  4. Switch to a different database tab in KeePassXC
  5. Attempt to login to the same site again (KeePassXC reports no logins found)

Debug info

Browser: Firefox 79 (not snap)

KeePassXC - Version 2.6.0 Revision: 0765954

Qt 5.9.5 Debugging mode is disabled.

Operating system: Ubuntu 18.04.4 LTS CPU architecture: x86_64 Kernel: linux 4.15.0-36-generic

Enabled extensions:

  • Auto-Type
  • Browser Integration
  • SSH Agent
  • KeeShare (signed and unsigned sharing)
  • YubiKey
  • Secret Service Integration

Cryptographic libraries: libgcrypt 1.8.1

garymoon avatar Aug 06 '20 18:08 garymoon

KeePassXC settings -> Browser Integration -> [x] Search in all opened databases for matching credentials.

varjolintu avatar Aug 06 '20 18:08 varjolintu

@varjolintu Thanks for the reply. I mentioned that option was checked in the original report. I'd appreciate any further suggestions you might have.

garymoon avatar Aug 06 '20 19:08 garymoon

I'm certain that feature works, I tested it on numerous occasions in 2.6.0

droidmonkey avatar Aug 06 '20 21:08 droidmonkey

@droidmonkey Yep, I'm sure it does or there'd be more tickets about it surely. If you have any suggestions as to what might be interfering in my case I'd be much obliged! Cheers.

garymoon avatar Aug 07 '20 01:08 garymoon

I just tested this and it worked fine. I have no ideas since it works when the db is focused.

droidmonkey avatar Aug 07 '20 03:08 droidmonkey

Okay, thank you @droidmonkey!

garymoon avatar Aug 07 '20 03:08 garymoon

After further testing it seems to search other databases if the one in focus has been connected to, but not otherwise. I'm wondering if that's expected behavior and my original post wasn't clear enough?

garymoon avatar Aug 07 '20 03:08 garymoon

No that's not expected so there is a bug here potentially.

droidmonkey avatar Aug 07 '20 03:08 droidmonkey

@garymoon Sorry, my tired eyes missed the option mention in your option report. Is your second database a copy/clone of your first one? Try this: go to Database Settings -> Browser Integration, click the button saying "Refresh database root group ID".

varjolintu avatar Aug 07 '20 04:08 varjolintu

@varjolintu No worries mate, thanks for the reply! :+1:

They're not copies, I'd checked the root IDs on both databases after seeing tickets related to that. I'll try that anyway and report back.

garymoon avatar Aug 07 '20 13:08 garymoon

Unfortunately refreshing the root group ID hasn't changed the situation.

garymoon avatar Aug 07 '20 23:08 garymoon

@varjolintu thanks for pointing me to this issue from #2409 As mentioned there i have the same issue when the focused database is not connected to the browser plugin. Additionally checked that both database have different root IDs.

Does this seem to be a general problem or just in single cases like @garymoon's and mine? Sorry for asking, this was not clear to me from the previous conversation.

gaensler avatar Aug 28 '20 07:08 gaensler

@gaensler It's an unhandled situation. Gotta fix that.

varjolintu avatar Aug 28 '20 07:08 varjolintu

I would recommend that KeepassXC create a warning dialog when opening a database that has a duplicate the root group UUID of any other open database to avoid issue #1275. The dialog should suggest the procedure (below) to address, bonus points for a setting to disable the notification, a checkbox to change the setting in the dialog, and a button to navigate to the Refresh button dialog.

  1. Choose Database > Database Settings...
  2. Choose the Browser Integration menu on the left side
  3. Press the "Refresh database root group ID" button
  4. Click OK button

mlavi avatar May 18 '21 19:05 mlavi

@mlavi I'm sure there's already a feature request about it.

varjolintu avatar May 18 '21 19:05 varjolintu

Just curious if there's been any movement on this issue.

ekimd avatar Dec 10 '21 19:12 ekimd

@ekimd Not yet. It needs some extra work.

varjolintu avatar Dec 11 '21 08:12 varjolintu

@varjolintu still need this issue?

droidmonkey avatar Mar 21 '22 16:03 droidmonkey

@droidmonkey Yup. Not fixed yet if there's duplicate Root UUID's.

varjolintu avatar Mar 21 '22 16:03 varjolintu

@droidmonkey Yup. Not fixed yet if there's duplicate Root UUID's.

Just to clarify. This isn't related to duplicate Root UUIDs. See @garymoon and @droidmonkey comment on Aug 6, 2020.

ekimd avatar Mar 21 '22 16:03 ekimd

@ekimd If not, then this is still not solved. But I've already started doing the fix. It's a bit tricky to fix and keep everything backwards compatible.

varjolintu avatar Mar 21 '22 17:03 varjolintu

I have the same here on macOS 12.6, FIrefox 107.0, KeepassXC 2.7.4 and KeePassXC-Browser 1.8.3.1. Good that there is an issue for that already ;-)

treee111 avatar Nov 22 '22 14:11 treee111

I also have this issue since years. The browser is not allowed on all opened databases and asks for permission instead of returning credentials from the other database not in focus.

Nama avatar Apr 18 '24 18:04 Nama

Fix for this has been already in work with the Protocol V2 branch.

varjolintu avatar Apr 18 '24 18:04 varjolintu

I faced the same issue (currently using version 2.7.9) and finally figured out that the problem was in fact that the browser extension hadn't connected to all my databases (issue #10550). After I selected databases one-by-one and clicked the "Connect" button in extension, they were all connected and searching from all of them started working.

atroxix avatar Sep 04 '24 06:09 atroxix

I faced the same issue (currently using version 2.7.9) and finally figured out that the problem was in fact that the browser extension hadn't connect to all my databases (issue #10550). After I selected databases one-by-one and clicked the "Connect" button in extension, they were all connected and searching from all of them started working.

Good to hear you got it working, but I'd still like to see a solution that doesn't require that myself. I have different databases for different contexts, and not every browser should need to be allowed to access all of them.

timelmer-uw avatar Sep 05 '24 23:09 timelmer-uw

and not every browser should need to be allowed to access all of them.

In that case, you don't want any of these solutions and you want the current behavior more or less.

droidmonkey avatar Sep 06 '24 00:09 droidmonkey

On the contrary, I'd like the extension to search any unlocked database that it is connected to, regardless if it is the active "tab", but I don't want to have to connect every database I might use to every browser.

Don't think this conversation is really relevant to the bug report, just wanted to clarify.

tim-elmer avatar Sep 06 '24 01:09 tim-elmer

On the contrary, I'd like the extension to search any unlocked database that it is connected to, regardless if it is the active "tab", but I don't want to have to connect every database I might use to every browser.

Same use case for me. I have a personal database and databases shared with others. I only want the personal database to be connected to my browser, but not the shared ones. Otherwise there would be a dozen of browsers connected to the shared ones.

gaensler avatar Sep 06 '24 06:09 gaensler

Just a reminder: https://github.com/keepassxreboot/keepassxc/issues/5238#issuecomment-2064955388

varjolintu avatar Sep 06 '24 06:09 varjolintu