Skip to content

Commit bbd4423

Browse files
committed
Fix saving SSH Agent settings
* Fixes #13351 * This unfortunately breaks backwards compatibility with the _original_ KeeAgent plugin for KeePass2. Qt6 refuses to write XML in UTF-16 format, so we have to use UTF-8. This should not be a big deal at all since our SSH agent integration has surpassed the original KeeAgent with features at this point.
1 parent 0d69edd commit bbd4423

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

src/sshagent/KeeAgentSettings.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -329,12 +329,7 @@ QByteArray KeeAgentSettings::toXml() const
329329
writer.writeEndElement(); // EntrySettings
330330
writer.writeEndDocument();
331331

332-
// Real KeeAgent can only read UTF-16
333-
auto toDecUtf16 = QStringDecoder(QStringConverter::Utf8);
334-
auto sUtf16 = toDecUtf16(ba);
335-
auto toEncUtf16 = QStringEncoder(QStringEncoder::Utf16);
336-
auto baUtf16 = toEncUtf16(sUtf16);
337-
return baUtf16;
332+
return ba;
338333
}
339334

340335
/**

0 commit comments

Comments
 (0)