Importing 1pux bug

Brrry
Brrry
Community Member
edited March 2023 in Lounge

When importing 1pux with passport item. The Birth date, issued on and expiry date are not imported.

Comments

  • MrC
    MrC
    Volunteer Moderator

    @Brrry

    I'm not seeing this after doing a conversion from mSecure6.

    Nor do I see it when I re-export, and re-import.

    Can you elaborate on your method of 1PUX generation?

  • Brrry
    Brrry
    Community Member
    edited March 2023

    Export your vault with passport then import back
    I'm using windows 11

  • MrC
    MrC
    Volunteer Moderator

    @Brrry

    That's exactly what I mentioned I did. I can try on Windows.

  • Brrry
    Brrry
    Community Member
    edited March 2023


    Your date format is different from creating new passport in android and windows
    Yours mm/d/yyyy
    Android d/mm/yyyy
    Windows yyyy-mm-d

  • MrC
    MrC
    Volunteer Moderator
    edited March 2023

    @Brrry

    It worked on Windows for me too.

    The value you see in the UI is not what is actually stored. What is stored are epoch values:

    {
      "overview": {
        "title": "a Passport",
        "ainfo": "347922"
      },
      "details": {
        "sections": [
          {
            "name": "",
            "title": "",
            "fields": [
              {
                "t": "type",
                "n": "type",
                "k": "string",
                "v": "what is this type thingy?",
                "inputTraits": {
                  "autocapitalization": "AllCharacters"
                }
              },
              {
                "t": "issuing country",
                "n": "issuing_country",
                "k": "string",
                "v": "US",
                "inputTraits": {
                  "autocapitalization": "Words"
                }
              },
              {
                "t": "number",
                "n": "number",
                "k": "string",
                "v": "347922",
                "inputTraits": {
                  "keyboard": "NamePhonePad"
                }
              },
              {
                "t": "full name",
                "n": "fullname",
                "k": "string",
                "v": "George H Ignoble",
                "inputTraits": {
                  "autocapitalization": "Words"
                }
              },
              {
                "t": "gender",
                "n": "gender",
                "k": "string"
              },
              {
                "t": "nationality",
                "n": "nationality",
                "k": "string",
                "v": "Dutch",
                "inputTraits": {
                  "autocapitalization": "Words"
                }
              },
              {
                "t": "issuing authority",
                "n": "issuing_authority",
                "k": "string",
                "v": "Gvmt",
                "inputTraits": {
                  "autocapitalization": "Words"
                }
              },
              {
                "t": "date of birth",
                "n": "birthdate",
                "k": "date"
              },
              {
                "t": "place of birth",
                "n": "birthplace",
                "k": "string",
                "v": "Holland",
                "inputTraits": {
                  "autocapitalization": "Words"
                }
              },
              {
                "t": "issued on",
                "n": "issue_date",
                "k": "date",
                "v": 1067587200
              },
              {
                "t": "expiry date",
                "n": "expiry_date",
                "k": "date",
                "v": 1827388800
              }
            ]
          }
        ]
      },
      "createdAt": "2023-03-03T20:15:02Z",
      "updatedAt": "2023-03-03T20:15:02Z",
      "faveIndex": 0,
      "trashed": "N",
      "templateUuid": "106",
      "uuid": "yp5dnyea5qhgau5ptprckkfda4"
    }
    

    See the expiry_date and issued_on date values. So long as the values are valid epoch values, and the field keys and types are valid, the values should be stored correctly.

  • Brrry
    Brrry
    Community Member
    edited March 2023

    well, It doesn't work for me.
    Did you create new item with passport. then export - reimport?

  • MrC
    MrC
    Volunteer Moderator
    edited March 2023

    @Brrry

    Yes, I create a brand new Passport item in the Windows version:

    1Password for Windows 8.10.1 (81001036)

    I'm not doubting you are seeing an issue, just trying to help figure out why our results are different, so that 1Password can replicate.

    Copy the 1PUX, change the copy's suffix to .zip. Then unzip it, and examine the file inside named export.data. Look for the key id values of "birthdate", "issue_date", and "expiry_date" within a passport item (which has templateUuid 106).

    Within the export.data file, the values will look like:

                          {
                            "title": "date of birth",
                            "id": "birthdate",
                            "value": {
                              "date": 1678190460
                            },
                            "guarded": false,
                            "multiline": false,
                            "dontGenerate": false,
                            "inputTraits": {
                              "keyboard": "default",
                              "correction": "default",
                              "capitalization": "default"
                            }
                          },
                          {
                            "title": "issued on",
                            "id": "issue_date",
                            "value": {
                              "date": 1677758460
                            },
                            "guarded": false,
                            "multiline": false,
                            "dontGenerate": false,
                            "inputTraits": {
                              "keyboard": "default",
                              "correction": "default",
                              "capitalization": "default"
                            }
                          },
                          {
                            "title": "expiry date",
                            "id": "expiry_date",
                            "value": {
                              "date": 1679227260
                            },
                            "guarded": false,
                            "multiline": false,
                            "dontGenerate": false,
                            "inputTraits": {
                              "keyboard": "default",
                              "correction": "default",
                              "capitalization": "default"
                            }
                          }
    

    What I showed in the previous post was a JSON copy of the value, copied directly from 1Password (and this format is more of a 1PIF format). What I show here is the actual JSON data in the export.data file (so it's in 1PUX format).

    Does your data's format differ?

  • Brrry
    Brrry
    Community Member
    edited March 2023

    I think this is what happened.
    I import my bitwarden passport using mcs.
    I noticed my passport dates disappeared. So I edited in 1password and put all the dates. Then export to 1pux. Reeimporting it back and dates disappeared again.
    The values from exported are null.

  • Brrry
    Brrry
    Community Member



    Imported from bitwarden json using mcu. Becomes 2 items the passport number alone in 1 item and the rest are in the another one but without dates.

  • MrC
    MrC
    Volunteer Moderator
    edited March 2023

    @Brrry

    Ok, that's interesting. The bitwarden converter will store the passport number field of a Bitwarden identity into a separate Passport entry (via record splitting).

    Since there is no Passport category in Bitwarden, the converter has no separate template for this. And any textual date values you added (via custom fields) would be stored into each of the created record's notes area. I presume you found those.

    I just tested this. I converted a Bitwarden vault, and imported. I found the sample Passport record created, which contains only the passport number field, as expected. And the custom fields were stored into the Notes area. I edited the Passport entry, added dates to the three fields we've been discussing, saved the record, exported, and re-imported the 1PUX.

    All the date values I'd added to the Passport record re-imported correctly.

    So I think I've ruled out the converter doing anything untoward. Unfortunately I'm at a loss to explain what you are seeing.

  • MrC
    MrC
    Volunteer Moderator
    edited March 2023

    @Brrry

    Tangential to this issue, and out of curiosity:

    I noticed my passport dates disappeared.

    How were these stored? I only know of Custom Fields in Bitwarden, and those do not support any date type (only Text, Hidden, Boolean, and Linked). And to my knowledge, there is no Passport category (aka Type) in Bitwarden.

    Can you confirm you found any custom field values in the Notes area of your records?

    Back to the topic at hand, the only thing that seems a candidate to cause the issue you see would be the Android app not correctly storing these fields into the Passport record.

  • Brrry
    Brrry
    Community Member

    Yes correct. Passport is stored in Identity. dates are custom fields. yes most are in notes.

  • MrC
    MrC
    Volunteer Moderator

    Ok, great @Brrry

    If you did your edits on Android, perhaps it would be worth testing adding the date values via the Windows app instead of Android, and see if the re-import of the exported 1PUX works as expected. That would help narrow the issue to the Android app.

  • Brrry
    Brrry
    Community Member

    I wish 1password would support exporting individual vaults. That way, it would be easier to test

  • MrC
    MrC
    Volunteer Moderator

    It would.

    What I have to do is change the .1pux suffix to .zip, unzip, use a text editor (preferably one with the ability to show matching brackets) to edit export.data to remove the vaults I don't want re-imported, possibly edit items within, save the file, re-zip the contents the contents, change the .zip suffix to .1pux, re-import.

    This is easy enough with the right tools, only taking a few seconds, but is likely not something most people will ever need or want to do. So you're stuck with importing the 1PUX, and deleting the duplicate vaults (which are easily identifiable).

This discussion has been closed.