From ba68e0a4a18e2f2cfa72237529714af5cffd360a 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 89775b507..27c6d1469 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(); }