From a884f779381d0958ce31a99c2cd9e62cd9fba521 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 25 Mar 2019 09:15:38 -0400 Subject: [PATCH] limit ph import to 5 max --- src/importers/bitwardenJsonImporter.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/importers/bitwardenJsonImporter.ts b/src/importers/bitwardenJsonImporter.ts index e4c376940e..1e94ad94db 100644 --- a/src/importers/bitwardenJsonImporter.ts +++ b/src/importers/bitwardenJsonImporter.ts @@ -46,6 +46,11 @@ export class BitwardenJsonImporter extends BaseImporter implements Importer { cipher.organizationId = null; cipher.collectionIds = null; + // make sure password history is limited + if (cipher.passwordHistory != null && cipher.passwordHistory.length > 5) { + cipher.passwordHistory = cipher.passwordHistory.slice(0, 5); + } + if (!this.organization && c.folderId != null && groupingsMap.has(c.folderId)) { result.folderRelationships.push([result.ciphers.length, groupingsMap.get(c.folderId)]); } else if (this.organization && c.collectionIds != null) {