Skip to content

Commit

Permalink
Merge branch 'fix-filters-for-null-passwords'
Browse files Browse the repository at this point in the history
Signed-off-by: binsky <timo@binsky.org>
  • Loading branch information
binsky08 committed Jul 17, 2023
2 parents 9d62315 + 324bb15 commit b58e3ca
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions js/app/controllers/credential.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Expand All @@ -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]);
}
}
Expand Down

0 comments on commit b58e3ca

Please sign in to comment.