From b8564d5c24ffcf0c4537c3619b0e1c47d3b8072b Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Sun, 29 Sep 2024 15:56:03 -0400 Subject: [PATCH] Handle alternative 1Pux password entry * Fixes #11298 --- src/format/OPUXReader.cpp | 3 +++ tests/TestImports.cpp | 5 +++++ tests/data/1PasswordExport.1pux | Bin 31621 -> 32079 bytes 3 files changed, 8 insertions(+) diff --git a/src/format/OPUXReader.cpp b/src/format/OPUXReader.cpp index ee5869b69..e1a0579cf 100644 --- a/src/format/OPUXReader.cpp +++ b/src/format/OPUXReader.cpp @@ -102,6 +102,9 @@ namespace entry->setPassword(fieldMap.value("value").toString()); } } + if (entry->password().isEmpty() && detailsMap.contains("password")) { + entry->setPassword(detailsMap.value("password").toString()); + } entry->setNotes(detailsMap.value("notesPlain").toString()); // Dive into the item sections to pull out advanced attributes diff --git a/tests/TestImports.cpp b/tests/TestImports.cpp index 84ef26cce..eb06599df 100644 --- a/tests/TestImports.cpp +++ b/tests/TestImports.cpp @@ -96,6 +96,11 @@ void TestImports::testOPUX() QVERIFY(entry); // Check custom group icon QVERIFY(!entry->group()->iconUuid().isNull()); + + // Check Category UUID 05 Passwords + entry = db->rootGroup()->findEntryByPath("/Personal/UUID 005 Password"); + QVERIFY(entry); + QCOMPARE(entry->password(), QStringLiteral("uuid005password")); } void TestImports::testOPVault() diff --git a/tests/data/1PasswordExport.1pux b/tests/data/1PasswordExport.1pux index 509d7d07b79726eb648ec263d1fbc9c46f58b529..12cfcb6c6b1ba042dfa5f85703f2af2d8d0c4be6 100644 GIT binary patch delta 4099 zcmV+e5d80j_W{rP0kC6ie_?$+S-qOydpHjO0QArR01E&B0A+Y^Z*p`lWMOn+?VbH| zqc$4HfA3$x_@}#@>#l>}cKg#go9624?$&Lx({4LEI|77J31^=#0U zK975!e!ckf^5XL1V$$oMzdxT|U0i$^O+W3*EzBf3k%i+nf+)PkcH{8nD3&AO23)LGpWN=lr)_Q3p}z-G3y0+<$_d zXBZ3?#!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