fix filters for credentials without a password

Signed-off-by: binsky <timo@binsky.org>
This commit is contained in:
binsky 2023-06-25 20:49:20 +02:00
parent fd7a88fee6
commit 5574064a41
No known key found for this signature in database
GPG key ID: B438F7FA2E3AC98F

View file

@ -478,12 +478,13 @@
let postFiltered=[];
for (let i = 0; i < initialCredentials.length; i++) {
const _credential = initialCredentials[i];
const zxcvbn_result = zxcvbn(_credential.password);
if (initialCredentials[i].password !== null) {
const zxcvbn_result = zxcvbn(initialCredentials[i].password);
if(zxcvbn_result.score>=strength_min && zxcvbn_result.score<=strength_max){
postFiltered.push(initialCredentials[i]);
}
if(zxcvbn_result.score>=strength_min && zxcvbn_result.score<=strength_max){
postFiltered.push(initialCredentials[i]);
}
}
}
$scope.filtered_credentials=$scope.filterHidden(postFiltered);
};
@ -510,7 +511,7 @@
for (let i = 0; i < initialCredentials.length; i++) {
const _credential = initialCredentials[i];
if(_credential.compromised !== false){
if(_credential.compromised !== false && _credential.compromised !== null){
postFiltered.push(initialCredentials[i]);
}
}