tiuub / KeeOtp2

KeeOtp2 is a plugin for KeePass. It provides a form to display one time passwords and is fully compatible with the built-in OTP function.
MIT License
122 stars 10 forks source link

'Cant migrate' errors migrating multiple KeeOtp(1) otp= secrets #4

Closed rasa closed 3 years ago

rasa commented 3 years ago

The error message is here: https://github.com/tiuub/KeeOtp2/blob/6f3de209208c1a2c5ebb7fd6225a63be0dce0547/KeeOtp2/Settings.cs#L104 The issue is the key needs to be right padded with =s to a multiple of 8 characters. The issue is discussed here. I proved this is the solution, by finding one of the password entries that KeeOtp2 failed to migrate, and calculated the length of the otp= secret, which was 26. I then added 2 =s to the end of the secret, to make it 28 characters long (28/4=7) and saving the entry. I then ran the migration function again, and it succeeded on that entry.

tiuub commented 3 years ago

Thank you for reporting this bug. Currently I am not able to work on this, but I am able to start again on Wednesday.

I will come back and notify you, if it is fixed.

tiuub commented 3 years ago

Hi, it should be fixed now. Please notify me, if it still happens.

rasa commented 3 years ago

v1.5.0 converted every entry successfully. Thank you for fixing! But note, to test this, I had to remove all entries that didn't have a otp field. See #11.

tiuub commented 3 years ago

Ok, so I had solved one part of the problem. I will test it and think about it. It shouldn't be that hard to fix this. Thank you!