mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-15 09:46:26 -04:00
Fix KeePass2Repair to retain multi-byte UTF-8 chars.
Since char is (often) unsigned the ch < 0x20 check matched all multi-byte encoded UTF-8 chars.
This commit is contained in:
parent
8a92cec03f
commit
208b803fbe
3 changed files with 3 additions and 3 deletions
|
@ -133,7 +133,7 @@ void TestKeePass2Writer::testRepair()
|
|||
{
|
||||
QString brokenDbFilename = QString(KEEPASSX_TEST_DATA_DIR).append("/bug392.kdbx");
|
||||
// master password = test
|
||||
// entry username: testuser\x10
|
||||
// entry username: testuser\x10\x20AC
|
||||
// entry password: testpw
|
||||
CompositeKey key;
|
||||
key.addKey(PasswordKey("test"));
|
||||
|
@ -153,7 +153,7 @@ void TestKeePass2Writer::testRepair()
|
|||
QVERIFY(dbRepaired);
|
||||
|
||||
QCOMPARE(dbRepaired->rootGroup()->entries().size(), 1);
|
||||
QCOMPARE(dbRepaired->rootGroup()->entries().at(0)->username(), QString("testuser"));
|
||||
QCOMPARE(dbRepaired->rootGroup()->entries().at(0)->username(), QString("testuser").append(0x20AC));
|
||||
QCOMPARE(dbRepaired->rootGroup()->entries().at(0)->password(), QString("testpw"));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue