mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Bitwarden import: Add support for timestamps and password history (#12588)
* Closes #12587 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: droidmonkey <2809491+droidmonkey@users.noreply.github.com> Co-authored-by: Jonathan White <support@dmapps.us>
This commit is contained in:
@@ -228,6 +228,16 @@ void TestImports::testBitwarden()
|
||||
QCOMPARE(entry->attribute("KP2A_URL_2"), QStringLiteral("https://gmail.com"));
|
||||
// Check TOTP
|
||||
QVERIFY(entry->hasTotp());
|
||||
// Check Modified and Created timestamps
|
||||
QCOMPARE(entry->timeInfo().lastModificationTime(),
|
||||
QDateTime::fromString(QStringLiteral("2024-12-25T12:00:00Z"), Qt::ISODate));
|
||||
QCOMPARE(entry->timeInfo().creationTime(),
|
||||
QDateTime::fromString(QStringLiteral("2024-12-01T12:00:00Z"), Qt::ISODate));
|
||||
// Check Password History
|
||||
QCOMPARE(entry->historyItems().size(), 1);
|
||||
QCOMPARE(entry->historyItems().first()->password(), QStringLiteral("oldpassword"));
|
||||
QCOMPARE(entry->historyItems().first()->timeInfo().lastModificationTime(),
|
||||
QDateTime::fromString(QStringLiteral("2024-12-01T12:00:00Z"), Qt::ISODate));
|
||||
// NOTE: Bitwarden does not export attachments
|
||||
// NOTE: Bitwarden does not export expiration dates
|
||||
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
],
|
||||
"items": [
|
||||
{
|
||||
"revisionDate": "2024-12-25T12:00:00.000Z",
|
||||
"creationDate": "2024-12-01T12:00:00.000Z",
|
||||
"deletedDate": null,
|
||||
"id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa",
|
||||
"organizationId": null,
|
||||
"folderId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
@@ -43,6 +46,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"revisionDate": "2024-12-25T12:00:00.000Z",
|
||||
"creationDate": "2024-12-01T12:00:00.000Z",
|
||||
"deletedDate": null,
|
||||
"id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
|
||||
"organizationId": null,
|
||||
"folderId": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
|
||||
@@ -80,6 +86,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"revisionDate": "2024-12-25T12:00:00.000Z",
|
||||
"creationDate": "2024-12-01T12:00:00.000Z",
|
||||
"deletedDate": null,
|
||||
"id": "cccccccc-cccc-cccc-cccc-cccccccccccc",
|
||||
"organizationId": null,
|
||||
"folderId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
@@ -129,6 +138,15 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"passwordHistory": [
|
||||
{
|
||||
"lastUsedDate": "2024-12-01T12:00:00.000Z",
|
||||
"password": "oldpassword"
|
||||
}
|
||||
],
|
||||
"revisionDate": "2024-12-25T12:00:00.000Z",
|
||||
"creationDate": "2024-12-01T12:00:00.000Z",
|
||||
"deletedDate": null,
|
||||
"id": "dddddddd-dddd-dddd-dddd-dddddddddddd",
|
||||
"organizationId": null,
|
||||
"folderId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
|
||||
Reference in New Issue
Block a user