dont toLower the saved username on addLogin

This commit is contained in:
Kyle Spearrin 2020-01-18 07:34:12 -05:00
parent 80945ca1df
commit 11d34cff88
1 changed files with 4 additions and 3 deletions

View File

@ -285,13 +285,14 @@ export default class RuntimeBackground {
return;
}
if (loginInfo.username != null) {
loginInfo.username = loginInfo.username.toLowerCase();
let normalizedUsername = loginInfo.username;
if (normalizedUsername != null) {
normalizedUsername = normalizedUsername.toLowerCase();
}
const ciphers = await this.cipherService.getAllDecryptedForUrl(loginInfo.url);
const usernameMatches = ciphers.filter((c) =>
c.login.username != null && c.login.username.toLowerCase() === loginInfo.username);
c.login.username != null && c.login.username.toLowerCase() === normalizedUsername);
if (usernameMatches.length === 0) {
const disabledAddLogin = await this.storageService.get<boolean>(
ConstantsService.disableAddLoginNotificationKey);