mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 10:13:31 +00:00
[PM-2256] Fix importer parsing credit card expiry year (#5444)
* Fix importer parsing credit card expiry year When importing a credit card from Enpass it was found that with a 4 digit expiry year was prefixed with '20', stored at 11/202025 instead of 11/2025. Fixed typo that checked length of month instead of year which incorrectly added prefix. * Refactor setCardExpiration to use RegExp
This commit is contained in:
@@ -100,7 +100,7 @@ describe("Enpass JSON Importer", () => {
|
||||
expect(cipher.card.brand).toEqual("Amex");
|
||||
expect(cipher.card.code).toEqual("1234");
|
||||
expect(cipher.card.expMonth).toEqual("3");
|
||||
expect(cipher.card.expYear).toEqual("23");
|
||||
expect(cipher.card.expYear).toEqual("2023");
|
||||
|
||||
// remaining fields as custom fields
|
||||
expect(cipher.fields.length).toEqual(9);
|
||||
|
||||
Reference in New Issue
Block a user