mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-24 12:06:15 +01:00
fixes for password wallet
This commit is contained in:
parent
61723f74d2
commit
520f20d428
@ -13,17 +13,26 @@ export class PasswordWalletTxtImporter extends BaseImporter implements Importer
|
||||
}
|
||||
|
||||
results.forEach((value) => {
|
||||
if (value.length < 6) {
|
||||
if (value.length < 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (value.length > 5) {
|
||||
this.processFolder(result, value[5]);
|
||||
}
|
||||
const cipher = this.initLoginCipher();
|
||||
cipher.name = this.getValueOrDefault(value[0], '--');
|
||||
cipher.notes = this.getValueOrDefault(value[4]);
|
||||
if (value.length > 4) {
|
||||
cipher.notes = this.getValueOrDefault(value[4], '').split('¬').join('\n');
|
||||
}
|
||||
if (value.length > 2) {
|
||||
cipher.login.username = this.getValueOrDefault(value[2]);
|
||||
}
|
||||
if (value.length > 3) {
|
||||
cipher.login.password = this.getValueOrDefault(value[3]);
|
||||
}
|
||||
if (value.length > 1) {
|
||||
cipher.login.uris = this.makeUriArray(value[1]);
|
||||
}
|
||||
this.cleanupCipher(cipher);
|
||||
result.ciphers.push(cipher);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user