Kunzisoft / KeePassDX

Lightweight vault and password manager for Android, KeePassDX allows editing encrypted data in a single file in KeePass format and fill in the forms in a secure way.
https://www.keepassdx.com/
GNU General Public License v3.0
4.35k stars 262 forks source link

Keepass field references #61

Closed markcs closed 4 years ago

markcs commented 6 years ago

Keepass allows field references in usernames and passwords. From https://keepass.info/help/base/fieldrefs.html

KeePass can insert data stored in different entries into fields of an entry. This means that multiple entries can share a common field (user name, password, ...), and by changing the actual data entry, all other entries will also use the new value.

KeePassDX copies the reference text and NOT the actual reference value.

J-Jamet commented 6 years ago

Thx for the reply, I'll try to solve this rapidly.

J-Jamet commented 6 years ago

It's now fixed in the new version 2.5.0.0beta8.

swedneck commented 5 years ago

The latest version on F-Droid still has this issue.

Suncatcher commented 4 years ago

Confirm this, I am on the latest version and the issue is NOT resolved. Why it is closed?

J-Jamet commented 4 years ago

I coded a fix and retested, maybe there was a regression.

J-Jamet commented 4 years ago

I just tested:: Username Magikeyboard Ref -> OK Password Magikeyboard Ref -> OK Username Clipboard Notification Ref Copy -> OK Password Clipboard Notification Ref Copy -> OK Username Clipboard Button Ref Copy -> KO Password Clipboard Button Ref Copy -> KO Username Autofill Ref -> OK Password Autofill Ref -> OK

J-Jamet commented 4 years ago

I fixed the problem in development, I added the references for custom fields.

Skycoder42 commented 4 years ago

It does not work for the magic keyboard! I have entries with a custom attribute named "E-Mail". My username references it as "{S:E-Mail}", but the reference is not resolved by the keyboard!

fritut08 commented 3 years ago

It does not work for me either. I have a password referenced via UUID as {REF:P@I:xxxxxxxxxxxxxxxxxxx} and this is what is pasted through magickeyboard instead of the actual password.

J-Jamet commented 3 years ago

It doesn't work with ref S because it is not implemented but should work with P and I. @fritut08 Are you using the latest version of the application?

fritut08 commented 3 years ago

Yes, it is the newest version

J-Jamet commented 3 years ago

Can you upload a test database that I can debug?

fritut08 commented 3 years ago

I think I know, what the problem is. I created kind of a reference cascade 😄

When I try to paste the password of entry 3 the UUID of entry 1 is pasted. So it does correctly dereference the first link but fails to check whether that entry also contains a reference. Keepass on desktop manages to find the correct password. Do you think you will be able to implement this or is this cascading too exotic? 😄

J-Jamet commented 3 years ago

This should be feasible but it can cause significant performance problems during searches because at each iteration, the field used as a reference (not necessarily a UUID) should be searched and this can be time consuming with a large database. I thought from memory that I had handled this case by having set a loop stop to avoid making infinite references but I may have broken the concept when I optimized the search. Can you open a new issue for this respecting the issue template (with a test database it would be great)?

fritut08 commented 3 years ago

Yes, I will try. Thanks.

Edit: Done! https://github.com/Kunzisoft/KeePassDX/issues/1027