From 57c1a0f4b6ce797acf7309b20fd5214da0a9d6de Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Sat, 9 Apr 2016 16:03:03 +0200 Subject: [PATCH] Show proper error message when key is wrong for .kdb files. --- src/format/KeePass1Reader.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/format/KeePass1Reader.cpp b/src/format/KeePass1Reader.cpp index 0e6b4a91..0175a62e 100644 --- a/src/format/KeePass1Reader.cpp +++ b/src/format/KeePass1Reader.cpp @@ -380,6 +380,10 @@ SymmetricCipherStream* KeePass1Reader::testKeys(const QString& password, const Q } } + if (!cipherStream) { + raiseError(tr("Wrong key or database file is corrupt.")); + } + return cipherStream.take(); }