dlech / KeeAgent

ssh agent plugin for KeePass 2.x
http://lechnology.com/software/keeagent
Other
522 stars 35 forks source link

Comments from key files not properly respected #369

Closed jaxFF closed 1 year ago

jaxFF commented 1 year ago

On the latest build (v0.13.2) there is an issue with either loading or parsing comments from pub/priv key pairs. This is reproducible by using the attached ed25519 key file(s), KeePass build 2.5.0 64-bit, and Windows 10 Pro Build 19044.

Keys that reproduce the issue: keeagent_comment_repro_20221015.zip

To Reproduce

  1. Create a new entry with a blank user name and password.
  2. Click on 'Advanced' and attach one of the two provided key-file pairs.
  3. Click on 'KeeAgent', 'Allow KeeAgent to use this entry', and provide the attached private key file.
  4. Observe that the comment from id_repro.pub is not preserved in the 'Key Info' section, or via the command line when the key is loaded into the agent.

image image

Future feature suggestion To prevent issues like this in the future in cases where the comment is not properly read, we should allow the plugin to fall back to using the title OR the comment for the password entry, as I personally use the same comment for my entry as the one stored in my pub key.

I think it would be more accessible to users if you could specify a fallback key info comment through this method, maybe provide the user a checkbox to confirm if they'd like to fall back on the entry name or comment.

jaxFF commented 1 year ago

I can since confirm that this regression was introduced in build v0.13.1. Reverting to build v0.12.1 fixes this issue.