diff --git a/libs/importer/spec/test-data/protonpass-json/protonpass.json.ts b/libs/importer/spec/test-data/protonpass-json/protonpass.json.ts index b421403166..ddbe9e89b9 100644 --- a/libs/importer/spec/test-data/protonpass-json/protonpass.json.ts +++ b/libs/importer/spec/test-data/protonpass-json/protonpass.json.ts @@ -102,7 +102,7 @@ export const testData: ProtonPassJsonFile = { cardType: 0, number: "1234222233334444", verificationNumber: "333", - expirationDate: "012025", + expirationDate: "2025-01", pin: "1234", }, }, diff --git a/libs/importer/src/importers/protonpass/protonpass-json-importer.ts b/libs/importer/src/importers/protonpass/protonpass-json-importer.ts index b680f0a387..7a7018bde2 100644 --- a/libs/importer/src/importers/protonpass/protonpass-json-importer.ts +++ b/libs/importer/src/importers/protonpass/protonpass-json-importer.ts @@ -84,9 +84,9 @@ export class ProtonPassJsonImporter extends BaseImporter implements Importer { cipher.card.code = this.getValueOrDefault(creditCardContent.verificationNumber); if (!this.isNullOrWhitespace(creditCardContent.expirationDate)) { - cipher.card.expMonth = creditCardContent.expirationDate.substring(0, 2); + cipher.card.expMonth = creditCardContent.expirationDate.substring(5, 7); cipher.card.expMonth = cipher.card.expMonth.replace(/^0+/, ""); - cipher.card.expYear = creditCardContent.expirationDate.substring(2, 6); + cipher.card.expYear = creditCardContent.expirationDate.substring(0, 4); } if (!this.isNullOrWhitespace(creditCardContent.pin)) {