mirror of
https://github.com/bitwarden/browser
synced 2025-12-30 23:23:52 +00:00
[EC-142] Fix error during import of 1pux containing new email field format (#758)
* Add support for complex email field type * Ensure complex email field type gets imported on identities
This commit is contained in:
committed by
GitHub
parent
5f4a8c18fe
commit
3b9ef68f4b
91
common/spec/importers/testData/onePassword1Pux/Emailfield.ts
Normal file
91
common/spec/importers/testData/onePassword1Pux/Emailfield.ts
Normal file
@@ -0,0 +1,91 @@
|
||||
import { ExportData } from "jslib-common/importers/onepasswordImporters/types/onepassword1PuxImporterTypes";
|
||||
|
||||
export const EmailFieldData: ExportData = {
|
||||
accounts: [
|
||||
{
|
||||
attrs: {
|
||||
accountName: "1Password Customer",
|
||||
name: "1Password Customer",
|
||||
avatar: "",
|
||||
email: "username123123123@gmail.com",
|
||||
uuid: "TRIZ3XV4JJFRXJ3BARILLTUA6E",
|
||||
domain: "https://my.1password.com/",
|
||||
},
|
||||
vaults: [
|
||||
{
|
||||
attrs: {
|
||||
uuid: "pqcgbqjxr4tng2hsqt5ffrgwju",
|
||||
desc: "Just test entries",
|
||||
avatar: "ke7i5rxnjrh3tj6uesstcosspu.png",
|
||||
name: "T's Test Vault",
|
||||
type: "U",
|
||||
},
|
||||
items: [
|
||||
{
|
||||
uuid: "47hvppiuwbanbza7bq6jpdjfxu",
|
||||
favIndex: 1,
|
||||
createdAt: 1619467985,
|
||||
updatedAt: 1619468230,
|
||||
trashed: false,
|
||||
categoryUuid: "100",
|
||||
details: {
|
||||
loginFields: [],
|
||||
notesPlain: "My Software License",
|
||||
sections: [
|
||||
{
|
||||
title: "",
|
||||
fields: [],
|
||||
},
|
||||
{
|
||||
title: "Customer",
|
||||
name: "customer",
|
||||
fields: [
|
||||
{
|
||||
title: "registered email",
|
||||
id: "reg_email",
|
||||
value: {
|
||||
email: {
|
||||
email_address: "kriddler@nullvalue.test",
|
||||
provider: "myEmailProvider",
|
||||
},
|
||||
},
|
||||
indexAtSource: 1,
|
||||
guarded: false,
|
||||
multiline: false,
|
||||
dontGenerate: false,
|
||||
inputTraits: {
|
||||
keyboard: "emailAddress",
|
||||
correction: "default",
|
||||
capitalization: "default",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Publisher",
|
||||
name: "publisher",
|
||||
fields: [],
|
||||
},
|
||||
{
|
||||
title: "Order",
|
||||
name: "order",
|
||||
fields: [],
|
||||
},
|
||||
],
|
||||
passwordHistory: [],
|
||||
},
|
||||
overview: {
|
||||
subtitle: "5.10.1000",
|
||||
title: "Limux Product Key",
|
||||
url: "",
|
||||
ps: 0,
|
||||
pbe: 0.0,
|
||||
pgrng: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -0,0 +1,87 @@
|
||||
import { ExportData } from "jslib-common/importers/onepasswordImporters/types/onepassword1PuxImporterTypes";
|
||||
|
||||
export const EmailFieldOnIdentityData: ExportData = {
|
||||
accounts: [
|
||||
{
|
||||
attrs: {
|
||||
accountName: "1Password Customer",
|
||||
name: "1Password Customer",
|
||||
avatar: "",
|
||||
email: "username123123123@gmail.com",
|
||||
uuid: "TRIZ3XV4JJFRXJ3BARILLTUA6E",
|
||||
domain: "https://my.1password.com/",
|
||||
},
|
||||
vaults: [
|
||||
{
|
||||
attrs: {
|
||||
uuid: "pqcgbqjxr4tng2hsqt5ffrgwju",
|
||||
desc: "Just test entries",
|
||||
avatar: "ke7i5rxnjrh3tj6uesstcosspu.png",
|
||||
name: "T's Test Vault",
|
||||
type: "U",
|
||||
},
|
||||
items: [
|
||||
{
|
||||
uuid: "45mjttbbq3owgij2uis55pfrlq",
|
||||
favIndex: 0,
|
||||
createdAt: 1619465450,
|
||||
updatedAt: 1619465789,
|
||||
trashed: false,
|
||||
categoryUuid: "004",
|
||||
details: {
|
||||
loginFields: [],
|
||||
notesPlain: "",
|
||||
sections: [
|
||||
{
|
||||
title: "Identification",
|
||||
name: "name",
|
||||
fields: [],
|
||||
},
|
||||
{
|
||||
title: "Address",
|
||||
name: "address",
|
||||
fields: [],
|
||||
},
|
||||
{
|
||||
title: "Internet Details",
|
||||
name: "internet",
|
||||
fields: [
|
||||
{
|
||||
title: "E-mail",
|
||||
id: "E-mail",
|
||||
value: {
|
||||
email: {
|
||||
email_address: "gengels@nullvalue.test",
|
||||
provider: "myEmailProvider",
|
||||
},
|
||||
},
|
||||
indexAtSource: 4,
|
||||
guarded: false,
|
||||
multiline: false,
|
||||
dontGenerate: false,
|
||||
inputTraits: {
|
||||
keyboard: "emailAddress",
|
||||
correction: "default",
|
||||
capitalization: "default",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
passwordHistory: [],
|
||||
},
|
||||
overview: {
|
||||
subtitle: "George Engels",
|
||||
title: "George Engels",
|
||||
url: "",
|
||||
ps: 0,
|
||||
pbe: 0.0,
|
||||
pgrng: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -0,0 +1,103 @@
|
||||
import { ExportData } from "jslib-common/importers/onepasswordImporters/types/onepassword1PuxImporterTypes";
|
||||
|
||||
export const EmailFieldOnIdentityPrefilledData: ExportData = {
|
||||
accounts: [
|
||||
{
|
||||
attrs: {
|
||||
accountName: "1Password Customer",
|
||||
name: "1Password Customer",
|
||||
avatar: "",
|
||||
email: "username123123123@gmail.com",
|
||||
uuid: "TRIZ3XV4JJFRXJ3BARILLTUA6E",
|
||||
domain: "https://my.1password.com/",
|
||||
},
|
||||
vaults: [
|
||||
{
|
||||
attrs: {
|
||||
uuid: "pqcgbqjxr4tng2hsqt5ffrgwju",
|
||||
desc: "Just test entries",
|
||||
avatar: "ke7i5rxnjrh3tj6uesstcosspu.png",
|
||||
name: "T's Test Vault",
|
||||
type: "U",
|
||||
},
|
||||
items: [
|
||||
{
|
||||
uuid: "45mjttbbq3owgij2uis55pfrlq",
|
||||
favIndex: 0,
|
||||
createdAt: 1619465450,
|
||||
updatedAt: 1619465789,
|
||||
trashed: false,
|
||||
categoryUuid: "004",
|
||||
details: {
|
||||
loginFields: [],
|
||||
notesPlain: "",
|
||||
sections: [
|
||||
{
|
||||
title: "Identification",
|
||||
name: "name",
|
||||
fields: [],
|
||||
},
|
||||
{
|
||||
title: "Address",
|
||||
name: "address",
|
||||
fields: [],
|
||||
},
|
||||
{
|
||||
title: "Internet Details",
|
||||
name: "internet",
|
||||
fields: [
|
||||
{
|
||||
title: "email",
|
||||
id: "email",
|
||||
value: {
|
||||
string: "gengels@nullvalue.test",
|
||||
},
|
||||
indexAtSource: 4,
|
||||
guarded: false,
|
||||
multiline: false,
|
||||
dontGenerate: false,
|
||||
inputTraits: {
|
||||
keyboard: "emailAddress",
|
||||
correction: "default",
|
||||
capitalization: "default",
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "2nd email",
|
||||
id: "2nd_email",
|
||||
value: {
|
||||
email: {
|
||||
email_address: "kriddler@nullvalue.test",
|
||||
provider: "myEmailProvider",
|
||||
},
|
||||
},
|
||||
indexAtSource: 1,
|
||||
guarded: false,
|
||||
multiline: false,
|
||||
dontGenerate: false,
|
||||
inputTraits: {
|
||||
keyboard: "emailAddress",
|
||||
correction: "default",
|
||||
capitalization: "default",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
passwordHistory: [],
|
||||
},
|
||||
overview: {
|
||||
subtitle: "George Engels",
|
||||
title: "George Engels",
|
||||
url: "",
|
||||
ps: 0,
|
||||
pbe: 0.0,
|
||||
pgrng: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -344,7 +344,10 @@ export const SanitizedExport: ExportData = {
|
||||
title: "",
|
||||
id: "irpvnshg5kjpkmj5jwy4xxkfom",
|
||||
value: {
|
||||
email: "plexuser@nullvalue.test",
|
||||
email: {
|
||||
email_address: "plexuser@nullvalue.test",
|
||||
provider: null,
|
||||
},
|
||||
},
|
||||
indexAtSource: 0,
|
||||
guarded: false,
|
||||
@@ -1434,7 +1437,10 @@ export const SanitizedExport: ExportData = {
|
||||
title: "registered email",
|
||||
id: "reg_email",
|
||||
value: {
|
||||
email: "kriddler@nullvalue.test",
|
||||
email: {
|
||||
email_address: "kriddler@nullvalue.test",
|
||||
provider: null,
|
||||
},
|
||||
},
|
||||
indexAtSource: 1,
|
||||
guarded: false,
|
||||
@@ -1536,7 +1542,10 @@ export const SanitizedExport: ExportData = {
|
||||
title: "support email",
|
||||
id: "support_email",
|
||||
value: {
|
||||
email: "support@nullvalue.test",
|
||||
email: {
|
||||
email_address: "support@nullvalue.test",
|
||||
provider: null,
|
||||
},
|
||||
},
|
||||
indexAtSource: 4,
|
||||
guarded: false,
|
||||
@@ -4014,7 +4023,10 @@ export const SanitizedExport: ExportData = {
|
||||
title: "registered email",
|
||||
id: "reg_email",
|
||||
value: {
|
||||
email: "",
|
||||
email: {
|
||||
email_address: "",
|
||||
provider: null,
|
||||
},
|
||||
},
|
||||
indexAtSource: 1,
|
||||
guarded: false,
|
||||
@@ -4116,7 +4128,10 @@ export const SanitizedExport: ExportData = {
|
||||
title: "support email",
|
||||
id: "support_email",
|
||||
value: {
|
||||
email: "",
|
||||
email: {
|
||||
email_address: "",
|
||||
provider: null,
|
||||
},
|
||||
},
|
||||
indexAtSource: 4,
|
||||
guarded: false,
|
||||
|
||||
@@ -93,7 +93,10 @@ export const SoftwareLicenseData: ExportData = {
|
||||
title: "registered email",
|
||||
id: "reg_email",
|
||||
value: {
|
||||
email: "kriddler@nullvalue.test",
|
||||
email: {
|
||||
email_address: "kriddler@nullvalue.test",
|
||||
provider: null,
|
||||
},
|
||||
},
|
||||
indexAtSource: 1,
|
||||
guarded: false,
|
||||
@@ -195,7 +198,10 @@ export const SoftwareLicenseData: ExportData = {
|
||||
title: "support email",
|
||||
id: "support_email",
|
||||
value: {
|
||||
email: "support@nullvalue.test",
|
||||
email: {
|
||||
email_address: "support@nullvalue.test",
|
||||
provider: null,
|
||||
},
|
||||
},
|
||||
indexAtSource: 4,
|
||||
guarded: false,
|
||||
|
||||
Reference in New Issue
Block a user