mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 10:13:31 +00:00
[PM-9318] Fix username on protonpass import (#9889)
* Fix username field used for ProtonPass import ProtonPass has changed their export format and userName is not itemEmail * Import additional field itemUsername --------- Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
6b122ca123
commit
83a32cd179
@@ -48,9 +48,10 @@ export class ProtonPassJsonImporter extends BaseImporter implements Importer {
|
||||
case "login": {
|
||||
const loginContent = item.data.content as ProtonPassLoginItemContent;
|
||||
cipher.login.uris = this.makeUriArray(loginContent.urls);
|
||||
cipher.login.username = this.getValueOrDefault(loginContent.username);
|
||||
cipher.login.username = this.getValueOrDefault(loginContent.itemEmail);
|
||||
cipher.login.password = this.getValueOrDefault(loginContent.password);
|
||||
cipher.login.totp = this.getValueOrDefault(loginContent.totpUri);
|
||||
this.processKvp(cipher, "itemUsername", loginContent.itemUsername);
|
||||
for (const extraField of item.data.extraFields) {
|
||||
this.processKvp(
|
||||
cipher,
|
||||
|
||||
@@ -56,10 +56,11 @@ export type ProtonPassItemExtraFieldData = {
|
||||
};
|
||||
|
||||
export type ProtonPassLoginItemContent = {
|
||||
username?: string;
|
||||
itemEmail?: string;
|
||||
password?: string;
|
||||
urls?: string[];
|
||||
totpUri?: string;
|
||||
itemUsername?: string;
|
||||
};
|
||||
|
||||
export type ProtonPassCreditCardItemContent = {
|
||||
|
||||
Reference in New Issue
Block a user