mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 14:23:32 +00:00
normalize username detection
This commit is contained in:
2
jslib
2
jslib
Submodule jslib updated: 57e49207e9...98c7dc1626
@@ -285,8 +285,13 @@ export default class RuntimeBackground {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (loginInfo.username != null) {
|
||||||
|
loginInfo.username = loginInfo.username.toLowerCase();
|
||||||
|
}
|
||||||
|
|
||||||
const ciphers = await this.cipherService.getAllDecryptedForUrl(loginInfo.url);
|
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) {
|
if (usernameMatches.length === 0) {
|
||||||
const disabledAddLogin = await this.storageService.get<boolean>(
|
const disabledAddLogin = await this.storageService.get<boolean>(
|
||||||
ConstantsService.disableAddLoginNotificationKey);
|
ConstantsService.disableAddLoginNotificationKey);
|
||||||
|
|||||||
Reference in New Issue
Block a user