Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Base-64 String #2001

Open
skoelzow opened this issue Mar 23, 2022 · 10 comments
Open

Invalid Base-64 String #2001

skoelzow opened this issue Mar 23, 2022 · 10 comments

Comments

@skoelzow
Copy link

Hi there I have a serious issue:
After adding a tag and syncing the the kdbx file, my KeePass on Windows cannot open it anymore (see screen shot).
I am using KeePass 2.50 (64-Bit) on Windows 11 Pro 21H2
Opening and using the file on NextCloud is still no problem. So I could export the database to xml an generate a new kdbx on windows.

KeeWeb v1.18.7 (dfc6201, 2021-11-30) on NextCloud 23.0.3 MariaDB 10 PHP 8
Environment: web
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.
Screenshot 2022-03-23 112803
0

@cyprienflx
Copy link

a workaround : switch file format to KDB4->KDB3
image

i think keeweb don't support KDB4.1 ;)

@skoelzow
Copy link
Author

skoelzow commented Apr 1, 2022

YESS! that was the trick thank you!
Is an upgrade to kdbx 4 compatibility planned?

@ilpssun
Copy link

ilpssun commented Jul 4, 2022

I'm also looking forward to kdbx4 compatibility – or at least a patch release that prevents me from accidentally saving a broken kdbx4 file.

@ilpssun
Copy link

ilpssun commented Jul 4, 2022

Seeing #2022, it does not seem likely to be resolved any time soon ☹️

@CyberFoxar
Copy link

Many thanks for this workaround. I can confirm that this is still an issue.

@AlBundy33
Copy link

According to the developer of KeePass this seems to be because keeweb does not store the last modification time in base64.

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

@AlBundy33
Copy link

after reading the projects I would assume that the issue is maybe here
https://github.com/keeweb/kdbxweb/blob/4bce1b0add2e4a6f34377b7cfa7c5ce2d49b16d7/lib/format/kdbx-custom-data.ts#L36

this line calls setDate
https://github.com/keeweb/kdbxweb/blob/4bce1b0add2e4a6f34377b7cfa7c5ce2d49b16d7/lib/utils/xml-utils.ts#L212
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.

@AlBundy33
Copy link

I was able to build a patched version with working kdbx4 format
https://github.com/AlBundy33/keeweb_kdbx4_hotfix

you can give it a try if you want.

@sdoowo200leldls
Copy link

Any followup to this issue? Saving a new entry on KeeWeb and then opening the db on the KeePass Windows app or KeePass2Android app causes this error for me.

@AlBundy33
Copy link

no fix in this project because of #2022

you can try https://github.com/AlBundy33/keeweb_kdbx4_hotfix
this is just a Dockerfile that builds keeweb from github (latest release) and includes two bugfixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants