Select group when adding new credentials#396
Conversation
|
This is not scalable and could get very confusing for people with many nested groups. Would it be possible to use an accordion type widget that shows only the top level groups, when that group is clicked it should the child, etc etc? Alternatively a select form element would be better since it would only ever show one group and the whole contents would be visible when dropped down. |
|
I updated the PR to include a tree view. I'll update the KeePassXC side soon. |
8a2641c to
ece93dc
Compare
|
Is the tree collapsed by default? (Should be) the arrows don't seem to indicate the correct state. |
|
@droidmonkey It's not collapsed, or cannot be collapsed. It's just a tree view. What do you suggest instead of the arrows (maybe arrow down like in KeePassXC)? Or should it definitely be able to collapse? |
ece93dc to
05a7c0b
Compare
|
I changed the icon to arrow down, indicating open tree. For now. |
| keepass.updateLastUsed(keepass.databaseHash); | ||
| callback(groups); | ||
| } else { | ||
| console.log('getDatabaseGroups rejected'); |
There was a problem hiding this comment.
Would you want to show a proper error at this point? Would the CANNOT_DECRYPT_MESSAGE be appropriate here?
There was a problem hiding this comment.
It's not appropriate here. The actual decryption is made much earlier. The extension actually doesn't have an error message for failed verification. I'll add it as a separate PR later, because that is something that every protocol command will need.
There was a problem hiding this comment.
Something like "Invalid or corrupt message sent from KeePassXC"
There was a problem hiding this comment.
Something like that yes. Currently the verifyResponse() returns false from multiple reasons, so the message must be a general one. The one you proposed or something like: "Message sent from KeePassXC cannot be verified".
05a7c0b to
e0f0008
Compare
e0f0008 to
ca888af
Compare
ca888af to
c01d331
Compare
78b48c8 to
0c17791
Compare
|
There is still a problem. When defining the group to save to, if it does not exist then the entry is silently dropped. The group should be created to store the new entry if it doesn't already exist. This will likely require changes on KeePassXC side. |
|
It also seems that triggering notifications from the popup doesn't work. Some changes are needed for that too. Probably we need to call the background script to activate them. |
|
@droidmonkey That is now done. KeePassXC side support is here: keepassxreboot/keepassxc#2790. |
|
I thought of a little vulnerability with create entry/group. There is really nothing stopping abuse of the API to create an entry or group. We prevent retrieving information from the database by showing allow/deny dialog, but we do not prevent writing to the database (from KeePassXC). |
|
@droidmonkey Yes. We need to restrict this in some way. |
|
We can introduce the protections in 2.4.1 |
a9d5d33 to
34362ff
Compare
droidmonkey
left a comment
There was a problem hiding this comment.
I really like this functionality

Allows selecting a group when adding new credentials to KeePassXC from the popup dialog.
A new command
get-database-groupsis added to the protocol. If older version than KeePassXC 2.4.0 is used, credentials are saved to the default KeePassXC-Browser Passwords group. For saving, both name and group UUID are used.The groups are read from a dynamic array where each group can contain N children:
Fixes #382.
Fixes #388.
Fixes #427.
Related KeePassXC PR: keepassxreboot/keepassxc#2637.
Also, a default group can be set, or the group can be asked every time:
