support url header for firefox import (#132)

This commit is contained in:
Kyle Spearrin 2020-07-20 14:20:32 -04:00 committed by GitHub
parent 7fa5178bff
commit b599c2e74f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -14,10 +14,11 @@ export class FirefoxCsvImporter extends BaseImporter implements Importer {
results.forEach((value) => { results.forEach((value) => {
const cipher = this.initLoginCipher(); const cipher = this.initLoginCipher();
cipher.name = this.getValueOrDefault(this.nameFromUrl(value.hostname), '--'); const url = this.getValueOrDefault(value.url, this.getValueOrDefault(value.hostname));
cipher.name = this.getValueOrDefault(this.nameFromUrl(url), '--');
cipher.login.username = this.getValueOrDefault(value.username); cipher.login.username = this.getValueOrDefault(value.username);
cipher.login.password = this.getValueOrDefault(value.password); cipher.login.password = this.getValueOrDefault(value.password);
cipher.login.uris = this.makeUriArray(value.hostname); cipher.login.uris = this.makeUriArray(url);
this.cleanupCipher(cipher); this.cleanupCipher(cipher);
result.ciphers.push(cipher); result.ciphers.push(cipher);
}); });