From 2636f38b3009b92ecbaceb194a557be4f3c13756 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 3 Jul 2018 22:24:21 -0400 Subject: [PATCH] exp-mon detection --- jslib | 2 +- src/services/autofill.service.ts | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/jslib b/jslib index 20622db73c..af43232567 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 20622db73c5c2a56777944bb06f32a21bf2e763f +Subproject commit af43232567fa63911725929d549f2b01927fa243 diff --git a/src/services/autofill.service.ts b/src/services/autofill.service.ts index 55a80424f6..fac2136731 100644 --- a/src/services/autofill.service.ts +++ b/src/services/autofill.service.ts @@ -13,7 +13,6 @@ import { AutofillService as AutofillServiceInterface } from './abstractions/auto import { CipherService, - PlatformUtilsService, TokenService, TotpService, } from 'jslib/abstractions'; @@ -443,7 +442,7 @@ export default class AutofillService implements AutofillServiceInterface { 'cc-mm', 'cc-m', 'card-mm', 'card-m', 'card-exp-mm', 'cc-exp-mm', 'exp-mm', 'exp-m', 'expire-month', 'expire-mo', 'card-expire-month', 'card-expire-mo', 'mois-validite', 'mois-expiration', 'm-validite', 'm-expiration', 'expiry-date-field-month', - 'expiration-date-month', 'expiration-date-mm'])) { + 'expiration-date-month', 'expiration-date-mm', 'exp-mon'])) { fillFields.expMonth = f; break; } else if (!fillFields.expYear && this.isFieldMatch(f[attr], @@ -757,7 +756,7 @@ export default class AutofillService implements AutofillServiceInterface { for (let i = 0; i < options.length; i++) { let option = options[i]; const checkValueContains = containsOptions == null || containsOptions.indexOf(option) > -1; - option = option.replace(/-/g, ''); + option = option.toLowerCase().replace(/-/g, ''); if (value === option || (checkValueContains && value.indexOf(option) > -1)) { return true; }