Prerequisites:
At step 3, KPX shows the unlock window for the database _on the first tab_ instead of the database that contain the item associated with that window.
If there is the need to use multiple files this issue could be easily triggered. I think the only solution is a search on the entire set of DBs and to come up with an unlock window for the right DB - or a warning message about more than one item matching the "window title".
N.B. what if there are more instances of KPX? I dont know...
KeePassXC - Version 2.1.3
Revision: 86e88c18b088aebaa97299c8fbdac4b5cdf8dfdd
Libraries:
Operating system: Ubuntu 16.04 LTS
CPU architecture: x86_64
Kernel: linux 4.4.0-62-generic
Enabled extensions:
Yes, this is a known issue sadly.
Oh, I searched but found nothing. Otherwise I would have skipped the whole description. Is it tracked somewhere (beside this one, I mean) ?
No, It's good since now we have an opened issue. Anyway I was discussing that in the #89 PR
There's a fundamental problem with this as you need to unlock the databases to know which one to use for auto-type and keeping that information in memory would be leaking sensitive information when the databases are locked.
Because usually you do know which database would have the right entry, my suggestion would be to have the same dialog pop up that's used for selecting the actual entry (a list) to select which (locked) database to unlock if no currently open database has a matching entry and continue that until all databases are unlocked, the user aborts or a match is found.
@hifi I was thinking about a tab interface in the unlocking dialog (like the tab you have in the keepassxc main window) and from there you can select witch tab/database you want to use, and if locked the dialog to unlock it
@TheZ3ro Would it be keyboard friendly? It was the main point of using the same kind of list. Just arrow up/down to select.
@hifi It will add a new window,
DB list window+ Unlock dialog if db locked + Entry select window if option to autoselect is disabled
With the tab window approach you have only 2 window. IDK if you can easily swap between databases but I think it will have the same behavior as the main window with >1 db opened
馃憤 need :)
We can just conserv tab order between 2 restart of keepassxc ? It's a first step, if main database stay on tab 1, no ?
Some options I thought of:
Have a select box to choose the database
Option to flag the main database
Always unlock database which contains auto-open entry (not really secure....)
option 1 slightly conflict with 4 (sincerely I prefer option 4)
option 2 seems to "slow" for me, I hope the user knows which database contains the right entry so they will select the right one. If the entry isn't found, ask again to the user. If the right entry is in the last database, the proposed option 2 will ask the user too many times to unlock if there are multiple DB.
option 3 can't be done if the database is locked. we can't store that information safely
option 5 can be simplified to: the first database is the main database
option 6 like option 3 above, if the database is locked we can't know if the database contains auto-open entry
I prefer option 4 and always saw that as what we need to do. The reason it's not been done yet is that is needs heavy rework of some of our basic code. Providing a dropdown menu seems like an easy thing to do, but unfortunately in this specific case, it's not. It is planned for 2.4, but it's not been worked on so far. I'm working on other basic refactoring stuff right now and I guess I'll start this one here once I'm done with it.
option 4 would work but it should involve some logic around what options to give the user if some databases are unlocked. If there is two databases and one is unlocked, search the unlocked database first, if that fails raise the dialogue but as there is only one locked database then it makes no sense presenting the selection to the user.
If there are more than two databases then the dialogue options should offer only the locked databases. I guess that's a little more complicated than simply presenting a list of all databases but it would make more sense to the user.
@dnel I perfectly agree with you in presenting to users only "interesting" db to unlock
Most helpful comment
I prefer option 4 and always saw that as what we need to do. The reason it's not been done yet is that is needs heavy rework of some of our basic code. Providing a dropdown menu seems like an easy thing to do, but unfortunately in this specific case, it's not. It is planned for 2.4, but it's not been worked on so far. I'm working on other basic refactoring stuff right now and I guess I'll start this one here once I'm done with it.