From f02c44decf5abcaafce171708f2d3916e4e80dd2 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 26 Dec 2019 07:51:16 -0500 Subject: [PATCH] normalize username detection --- jslib | 2 +- src/background/runtime.background.ts | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/jslib b/jslib index 57e49207e9a..98c7dc16262 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 57e49207e9ad57c71576fc487a38513a4d0fe120 +Subproject commit 98c7dc162628129d0bddbf20359d389dacb661d3 diff --git a/src/background/runtime.background.ts b/src/background/runtime.background.ts index 5ecc7a50ad9..8d94637ab42 100644 --- a/src/background/runtime.background.ts +++ b/src/background/runtime.background.ts @@ -285,8 +285,13 @@ export default class RuntimeBackground { return; } + if (loginInfo.username != null) { + loginInfo.username = loginInfo.username.toLowerCase(); + } + const ciphers = await this.cipherService.getAllDecryptedForUrl(loginInfo.url); - const usernameMatches = ciphers.filter((c) => c.login.username === loginInfo.username); + const usernameMatches = ciphers.filter((c) => + c.login.username != null && c.login.username.toLowerCase() === loginInfo.username); if (usernameMatches.length === 0) { const disabledAddLogin = await this.storageService.get( ConstantsService.disableAddLoginNotificationKey);