keeweb/kdbxweb

kdbxweb creates corrupted kdbx 4 database

AlBundy33 opened this issue · 3 comments

see
keeweb/keeweb#2001
https://sourceforge.net/p/keepass/bugs/2231/
https://keepass.info/help/kb/kdbx_4.1.html#cd_lastmod

after reading the source I would assume that the issue is maybe here

XmlUtils.setDate(

this line calls setDate

export function setDate(node: Node, date: Date | undefined, binary = false): void {

with only two arguments and therefore binary is false and the date is written as iso-string instead of base64

because the lastModificationTime is only written for dataases >= 4.1 - so it should be save to add the third parameter with true.

I was able to build keeweb with my modification, saved a database in kdbx3 und kdbx4 format and successfully opened then in keepass.

https://github.com/AlBundy33/keeweb_kdbx4_hotfix

Thanks for submitting this. I was recently added onto the team; so I'm getting adjusted to the structure of the code and we've started up development on KeeWeb again.

So let me review these changes, run some tests to ensure it doesn't break anything, and I'll update you.

@Aetherinox any news about integration?
this issue breaks compatibility to KeePass 🤔