normalize username detection

This commit is contained in:
Kyle Spearrin 2019-12-26 07:51:16 -05:00
parent 86e3374d3d
commit f02c44decf
2 changed files with 7 additions and 2 deletions

2
jslib

@ -1 +1 @@
Subproject commit 57e49207e9ad57c71576fc487a38513a4d0fe120
Subproject commit 98c7dc162628129d0bddbf20359d389dacb661d3

View File

@ -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<boolean>(
ConstantsService.disableAddLoginNotificationKey);