mirror of
https://github.com/nextcloud/passman.git
synced 2024-12-26 01:24:35 +08:00
Ignore failed passwords
This commit is contained in:
parent
89cc87ba70
commit
0bd169cbf5
1 changed files with 14 additions and 10 deletions
|
@ -155,17 +155,21 @@
|
|||
for (var i = 0; i < vault.credentials.length; i++) {
|
||||
var c = angular.copy(vault.credentials[i]);
|
||||
if (c.password && c.hidden === 0) {
|
||||
c = CredentialService.decryptCredential(c);
|
||||
if (c.password) {
|
||||
var zxcvbn_result = zxcvbn(c.password);
|
||||
if (zxcvbn_result.score <= minStrength) {
|
||||
results.push({
|
||||
credential_id: c.credential_id,
|
||||
label: c.label,
|
||||
password: c.password,
|
||||
password_zxcvbn_result: zxcvbn_result
|
||||
});
|
||||
try {
|
||||
c = CredentialService.decryptCredential(c);
|
||||
if (c.password) {
|
||||
var zxcvbn_result = zxcvbn(c.password);
|
||||
if (zxcvbn_result.score <= minStrength) {
|
||||
results.push({
|
||||
credential_id: c.credential_id,
|
||||
label: c.label,
|
||||
password: c.password,
|
||||
password_zxcvbn_result: zxcvbn_result
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (e){
|
||||
console.warn(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue