1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-20 09:23:23 +00:00

Skip FirefoxAccounts during Firefox CSV Import (#323)

* Skip FirefoxAccounts during Firefox CSV Import

Firefox exports 'chrome://FirefoxAccounts' if Firefox Accouts are used
in browser. It's quite hacky - password field in CSV is actually a JSON
encoded data, not a password.
Because it's not a useful record, it should be skipped during import.

* Fix indentation

* Move test Firefox test data to files, fix linter errors
This commit is contained in:
Tomasz Zdybał
2021-04-12 19:08:56 +02:00
committed by GitHub
parent 62cc43fb46
commit 827674847f
4 changed files with 82 additions and 1 deletions

View File

@@ -12,7 +12,9 @@ export class FirefoxCsvImporter extends BaseImporter implements Importer {
return Promise.resolve(result);
}
results.forEach(value => {
results.filter(value => {
return value.url !== 'chrome://FirefoxAccounts';
}).forEach(value => {
const cipher = this.initLoginCipher();
const url = this.getValueOrDefault(value.url, this.getValueOrDefault(value.hostname));
cipher.name = this.getValueOrDefault(this.nameFromUrl(url), '--');