mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-25 07:19:42 -05:00
parent
f690522725
commit
d0016bf6c4
@ -635,7 +635,7 @@ void KeePass2XmlReader::parseEntryString(Entry* entry)
|
||||
|
||||
if (isProtected && !value.isEmpty()) {
|
||||
if (m_randomStream) {
|
||||
value = m_randomStream->process(QByteArray::fromBase64(value.toAscii()));
|
||||
value = QString::fromUtf8(m_randomStream->process(QByteArray::fromBase64(value.toAscii())));
|
||||
}
|
||||
else {
|
||||
raiseError(9);
|
||||
|
@ -43,6 +43,7 @@ void TestKeePass2Writer::initTestCase()
|
||||
group->setUuid(Uuid::random());
|
||||
group->setNotes("I'm a note!");
|
||||
Entry* entry = new Entry();
|
||||
entry->setPassword(QString::fromUtf8("\xc3\xa4\xa3\xb6\xc3\xbc\xe9\x9b\xbb\xe7\xb4\x85"));
|
||||
entry->setUuid(Uuid::random());
|
||||
entry->attributes()->set("test", "protectedTest", true);
|
||||
QVERIFY(entry->attributes()->isProtected("test"));
|
||||
@ -93,6 +94,11 @@ void TestKeePass2Writer::testAttachments()
|
||||
QCOMPARE(entry->attachments()->value("aaa.txt"), QByteArray("also an attachment"));
|
||||
}
|
||||
|
||||
void TestKeePass2Writer::testNonAsciiPasswords()
|
||||
{
|
||||
QCOMPARE(m_dbTest->rootGroup()->entries()[0]->password(), m_dbOrg->rootGroup()->entries()[0]->password());
|
||||
}
|
||||
|
||||
void TestKeePass2Writer::cleanupTestCase()
|
||||
{
|
||||
delete m_dbOrg;
|
||||
|
@ -31,6 +31,7 @@ private Q_SLOTS:
|
||||
void testBasic();
|
||||
void testProtectedAttributes();
|
||||
void testAttachments();
|
||||
void testNonAsciiPasswords();
|
||||
void cleanupTestCase();
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user