mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-28 12:45:45 +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) => {
|
results.forEach((value) => {
|
||||||
if (value.length < 6) {
|
if (value.length < 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (value.length > 5) {
|
||||||
this.processFolder(result, value[5]);
|
this.processFolder(result, value[5]);
|
||||||
|
}
|
||||||
const cipher = this.initLoginCipher();
|
const cipher = this.initLoginCipher();
|
||||||
cipher.name = this.getValueOrDefault(value[0], '--');
|
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]);
|
cipher.login.username = this.getValueOrDefault(value[2]);
|
||||||
|
}
|
||||||
|
if (value.length > 3) {
|
||||||
cipher.login.password = this.getValueOrDefault(value[3]);
|
cipher.login.password = this.getValueOrDefault(value[3]);
|
||||||
|
}
|
||||||
|
if (value.length > 1) {
|
||||||
cipher.login.uris = this.makeUriArray(value[1]);
|
cipher.login.uris = this.makeUriArray(value[1]);
|
||||||
|
}
|
||||||
this.cleanupCipher(cipher);
|
this.cleanupCipher(cipher);
|
||||||
result.ciphers.push(cipher);
|
result.ciphers.push(cipher);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user