default to text field type (#102)

This commit is contained in:
Kyle Spearrin 2020-05-20 15:30:58 -04:00 committed by GitHub
parent fb7335b927
commit 2858724f44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 4 deletions

View File

@ -79,7 +79,8 @@ export class EnpassJsonImporter extends BaseImporter implements Importer {
} else if (field.type === 'url') {
urls.push(field.value);
} else {
this.processKvp(cipher, field.label, field.value, field.sensitive === 1 ? FieldType.Hidden : null);
this.processKvp(cipher, field.label, field.value,
field.sensitive === 1 ? FieldType.Hidden : FieldType.Text);
}
});
cipher.login.uris = this.makeUriArray(urls);
@ -102,10 +103,12 @@ export class EnpassJsonImporter extends BaseImporter implements Importer {
cipher.card.code = field.value;
} else if (field.type === 'ccExpiry' && this.isNullOrWhitespace(cipher.card.expYear)) {
if (!this.setCardExpiration(cipher, field.value)) {
this.processKvp(cipher, field.label, field.value, field.sensitive === 1 ? FieldType.Hidden : null);
this.processKvp(cipher, field.label, field.value,
field.sensitive === 1 ? FieldType.Hidden : FieldType.Text);
}
} else {
this.processKvp(cipher, field.label, field.value, field.sensitive === 1 ? FieldType.Hidden : null);
this.processKvp(cipher, field.label, field.value,
field.sensitive === 1 ? FieldType.Hidden : FieldType.Text);
}
});
}
@ -115,7 +118,8 @@ export class EnpassJsonImporter extends BaseImporter implements Importer {
if (this.isNullOrWhitespace(field.value) || field.type === 'section') {
return;
}
this.processKvp(cipher, field.label, field.value, field.sensitive === 1 ? FieldType.Hidden : null);
this.processKvp(cipher, field.label, field.value,
field.sensitive === 1 ? FieldType.Hidden : FieldType.Text);
});
}