Created attachment 164592 [details] Dialog which appears after typing in my password SUMMARY I ran kmymoney flawlessly on my Debian testing system over the past few months. When I recently switched to a new system, I wasn't able to unlock my encrypted sqlite db because kmymoney keeps prompting for my paasword (see screenshot attached). After a little discussion in the Telegram group I compared the versions of - sqlite3 - libsqlite3 on booth systems. The old system was running - sqlite3 3.43.2 - libsqlite3 3.43.2 and I moved to - sqlite3 33.44.2 - libsqlite3 3.44.2 When I downgrade the packages on my new system the issue still occurs. Upgrading the packages on my old system leads to the described issue and it's not resolvable by downgrading again. STEPS TO REPRODUCE 1. Install kmymones on a system with sqlite=3.43.2 and - libsqlite3=3.43.2 2. Create a password protected sqlite db 3. Unlocking the db should be possible 4. Updrade packages to sqlite3=33.44.2 and libsqlite3=3.44.2 5. Unlocking the db should not be possible OBSERVED RESULT Unlocking the db is not possible. EXPECTED RESULT Unlocking should be possible. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Debian 6.5.13-1 (available in About System) KDE Plasma Version: 5.27.9 KDE Frameworks Version: 5.107.0 Qt Version: 5.15.10 ADDITIONAL INFORMATION
As I remember (I don't use that backend) sqlite itself does not handle encryption, but requires sqlcipher. Your problem is likely a version issue with that, and doesn't really have anything at all to do with KMymoney. What are the relevant version of sqlcipher on your two machines? Minor question - is your item 5 above a typo? I would expect it IS NOT possible but SHOULD be possible. (Even if sqlite on Ubuntu handle encryption itself without using sqlcipher, I would raise this issue on an Ubuntu forum or a sqlite related list or forum. If the database itself cannot open your file, there is nothing KMyMoney can do.)
(In reply to Jack from comment #1) > As I remember (I don't use that backend) sqlite itself does not handle > encryption, but requires sqlcipher. Your problem is likely a version issue > with that, and doesn't really have anything at all to do with KMymoney. > What are the relevant version of sqlcipher on your two machines? > Minor question - is your item 5 above a typo? I would expect it IS NOT > possible but SHOULD be possible. > (Even if sqlite on Ubuntu handle encryption itself without using sqlcipher, > I would raise this issue on an Ubuntu forum or a sqlite related list or > forum. If the database itself cannot open your file, there is nothing > KMyMoney can do.) Thanks for your reply. I made an interesting observation regarding sqlcipher. I'm able to open the database with sqlcipher version 3.x.x from local cli. Versions = 4.x.x throw an error. But it is possible to enable a v3 compatibility mode with "PRAGMA cipher_compatibility = 3;" . Then I can open the db with sqlcipher = 4.x.x. However mymoney is still broken for me.
I suspect that either you will need to explicitly convert your database from version 3 to version 4, or else we need to figure out how to get KMyMoney to invoke sqlcipher with the compatability setting. I don't use sqlcipher, so I'm only guessing, but is there a config file where you can specify to always use compatability mode?
(In reply to Jack from comment #3) > I suspect that either you will need to explicitly convert your database > from version 3 to version 4, or else we need to figure out how to get > KMyMoney to invoke sqlcipher with the compatability setting. I don't use > sqlcipher, so I'm only guessing, but is there a config file where you can > specify to always use compatability mode? I took that from https://discuss.zetetic.net/t/upgrading-to-sqlcipher-4/3283
(In reply to nils from comment #4) > (In reply to Jack from comment #3) > > I suspect that either you will need to explicitly convert your database > > from version 3 to version 4, or else we need to figure out how to get > > KMyMoney to invoke sqlcipher with the compatability setting. I don't use > > sqlcipher, so I'm only guessing, but is there a config file where you can > > specify to always use compatability mode? > > I took that from https://discuss.zetetic.net/t/upgrading-to-sqlcipher-4/3283 I got mymoney running again by: 1. Let mymoney create a new encrypted sqlite db 2. Follow step 3 (custom export migration) from https://discuss.zetetic.net/t/upgrading-to-sqlcipher-4/3283
Since this really isn't a bug in KMyMoney, should we close it as WORKSFORME? The only alternative I can think of is to make it a wishlist for KMyMoney to recognize a v3 sqlcipher file when running with v4, and automatically convert the file to v4.
(In reply to Jack from comment #6) > Since this really isn't a bug in KMyMoney, should we close it as WORKSFORME? > The only alternative I can think of is to make it a wishlist for KMyMoney > to recognize a v3 sqlcipher file when running with v4, and automatically > convert the file to v4. Yep let's close this one. Would be great if mymoney would do the conversion automatically. Thanks for your help.