keepassxreboot / keepassxc

KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.
https://keepassxc.org/
Other
21.28k stars 1.47k forks source link

Credentials not returned when unconnected database is in focus #5238

Open garymoon opened 4 years ago

garymoon commented 4 years ago

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:

Cryptographic libraries: libgcrypt 1.8.1

varjolintu commented 4 years ago

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

garymoon commented 4 years ago

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

droidmonkey commented 4 years ago

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

garymoon commented 4 years ago

@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.

droidmonkey commented 4 years ago

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

garymoon commented 4 years ago

Okay, thank you @droidmonkey!

garymoon commented 4 years ago

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?

droidmonkey commented 4 years ago

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

varjolintu commented 4 years ago

@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".

garymoon commented 4 years ago

@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 commented 4 years ago

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

gaensler commented 4 years ago

@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.

varjolintu commented 4 years ago

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

mlavi commented 3 years ago

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
varjolintu commented 3 years ago

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

ekimd commented 2 years ago

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

varjolintu commented 2 years ago

@ekimd Not yet. It needs some extra work.

droidmonkey commented 2 years ago

@varjolintu still need this issue?

varjolintu commented 2 years ago

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

ekimd commented 2 years ago

@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.

varjolintu commented 2 years ago

@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.

treee111 commented 1 year ago

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

Nama commented 6 months ago

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.

varjolintu commented 6 months ago

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

atroxix commented 2 months ago

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.

timelmer-uw commented 2 months ago

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.

droidmonkey commented 2 months ago

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.

tim-elmer commented 2 months ago

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.

gaensler commented 2 months ago

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.

varjolintu commented 2 months ago

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