Bug 401878 - Password denied in 2.16.2, works fine in 2.15.0
Summary: Password denied in 2.16.2, works fine in 2.15.0
Status: RESOLVED FIXED
Alias: None
Product: skrooge
Classification: Applications
Component: general (show other bugs)
Version: 2.17.0
Platform: Other Linux
: NOR critical
Target Milestone: ---
Assignee: Stephane MANKOWSKI
URL:
Keywords:
: 402011 402147 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-12-08 00:23 UTC by Christoph Vogtländer
Modified: 2018-12-20 18:28 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
trace created with SKGTRACE=10 and SKGTRACESQL=1 (1.02 MB, text/plain)
2018-12-19 23:10 UTC, Christoph Vogtländer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Vogtländer 2018-12-08 00:23:18 UTC
SUMMARY
Opening my encrypted skg-file with Skrooge 2.16.2 prompts for the password as normal. But, the file won't open: "Wrong password. This file seems to be protected. Please enter the password."

Using Skrooge 2.15.0 (AppImage) the file opens just fine so I'm pretty sure the password is correct.

STEPS TO REPRODUCE
Open attached file with Skrooge 2.16.2

OBSERVED RESULT
Skrooge does not open the file

EXPECTED RESULT
Skrooge should open the file (and version 2.15.0 does)

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 5.14.4
KDE Frameworks Version: 5.52.0
Qt Version: 5.11.2

ADDITIONAL INFORMATION
The password for the attached file is "test". The file is a stripped down and anonymized version of my working file. I used the 2.15.0 AppImage to change the password and anonymize the data.
Comment 1 Christoph Vogtländer 2018-12-08 00:31:35 UTC
Even after removing the password using 2.15.0 the file will not open with 2.16.2. While 2.15.0 opens the file without prompting for a password as expected, 2.16.2 still comes up with the password dialogue. Clicking "OK" will again show "Wrong password" (well, this might be some follow up error as the file is not protected at all and trying to decode will fail even with an empty password)
Comment 2 Stephane MANKOWSKI 2018-12-08 08:12:37 UTC
Hi,

This bug is known and due to SQLCipher 4.0 (not compliant with SQLCipher 3).
A correction has been done (2 commits):
https://cgit.kde.org/skrooge.git/commit/?id=c66fb6b2e49cfa9e3fc8144408cfa7bf3d7e3988
https://cgit.kde.org/skrooge.git/commit/?id=42dfd616606e6c5e20d0c107ac4a0780570cb196

You can ask to Arch packager to package again with those patches.
Else, you will have it in next version published soon.
Comment 3 Christoph Vogtländer 2018-12-10 14:45:42 UTC
For Arch Linux see https://bugs.archlinux.org/task/60989?project=5&string=skrooge
Comment 4 Stephane MANKOWSKI 2018-12-11 17:38:11 UTC
*** Bug 402011 has been marked as a duplicate of this bug. ***
Comment 5 Stephane MANKOWSKI 2018-12-15 11:29:42 UTC
*** Bug 402147 has been marked as a duplicate of this bug. ***
Comment 6 Christoph Vogtländer 2018-12-17 23:22:49 UTC
The error still persists in 2.17.0

see also https://bugs.archlinux.org/task/60989
Comment 7 Stephane MANKOWSKI 2018-12-19 09:14:03 UTC
Could you generate traces like this?
export SKGTRACE=10
export SKGTRACESQL=1
skrooge > traces.txt 2>&1
Comment 8 Christoph Vogtländer 2018-12-19 23:10:30 UTC
Created attachment 117019 [details]
trace created with SKGTRACE=10 and SKGTRACESQL=1
Comment 9 Christoph Vogtländer 2018-12-19 23:21:38 UTC
As a side note: Skrooge 2.17.0 is able to open a newly created files, with or without password. Don't know if this helps to track this down.

My old file, even if I clean up everything (deleted all transactions, accounts, etc), is still about 47MB. It's too big to add to the bugtracker.
You can download it from here: https://lunik.synology.me:1443/nextcloud/index.php/s/sPNYKX9A9TY6E2s
PWD is "test"
Comment 10 Stephane MANKOWSKI 2018-12-20 06:15:36 UTC
Git commit b370575abe8d80b90e4552f1c027c9b58947a9f1 by Stephane MANKOWSKI.
Committed on 20/12/2018 at 06:15.
Pushed by smankowski into branch 'master'.

Password denied in 2.16.2, works fine in 2.15.0

M  +3    -0    skgbasemodeler/skgdocument.cpp

https://commits.kde.org/skrooge/b370575abe8d80b90e4552f1c027c9b58947a9f1
Comment 11 Stephane MANKOWSKI 2018-12-20 06:18:29 UTC
Hi,

I'm not able to test if this correction works well because SQLCIPHER 4 is not available on my system.
But, I just discovered that my previous fix was done ONLY in one case (recovery) and not done in normal load.
I did a new fix. Could you ask to Arch team to test it?

Take me informed.
Comment 12 Christoph Vogtländer 2018-12-20 18:28:39 UTC
The patch works. Tested with arch linux community testing package skrooge-2.17.0-2