Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

LastPass CSV import fails with secure notes #55

Closed
Aculeo opened this issue Apr 17, 2017 · 15 comments
Closed

LastPass CSV import fails with secure notes #55

Aculeo opened this issue Apr 17, 2017 · 15 comments

Comments

@Aculeo
Copy link

Aculeo commented Apr 17, 2017

It ends up printing that the password should not be longer than 300 chars. Secure Notes have the URL "http://sn", and the content of secure notes in LastPass has no size limit as far as I know, which is stored in the password column. Perhaps it should just ignore that particular URL until Bitwarden can handle notes as well.

And one other small issue: Import fails as well when there's empty lines at the beginning of the CSV file. Those empty lines were added automatically when copy/pasting. In my opinion, the importer should be a bit more forgiving there and just ignore them. I had to remove them manually to continue.

@kspearrin
Copy link
Member

Secure note information should not be stored in the password column as far as I know. It should be in the notes column of the exported CSV. Is this not the case?

@Aculeo
Copy link
Author

Aculeo commented Apr 17, 2017

Woops, you are correct, I didn't see that. I don't have a notes column though: url,username,password,extra,name,grouping,fav.

I had one weird entry, which I think is from the Desktop Client. It has a really long JSON string in there as the password field for some reason. {"version":1,"accountData":{"sessionTokenContext":"fx_desktop_v1","customizeSync":false,"kA":"SOMEREALLYLONGHASH"}}

I thought it was the secure notes, but it was just this entry.

@kspearrin
Copy link
Member

Sorry, for LastPass their notes column is called "extra".

Yea, looks like just some bad data for one of your passwords that needed to be cleaned out.

@Aculeo
Copy link
Author

Aculeo commented Apr 20, 2017

I guess it's fine then. Ideally it would just import all passwords that aren't too long without complaining. My mistake, I didn't test properly and didn't notice that.

@Aculeo Aculeo closed this as completed Apr 20, 2017
@gardner
Copy link

gardner commented Sep 27, 2017

Hi, not sure if I should post this here or not. I want to help improve the import process if possible. I am just switching over to Bitwarden from LastPass now and I ran into issues with the import as well. The import indicates that Secure Notes (extra) should not exceed 10,000 chars. The fields don't seem to be over 10,000 characters and the line numbers seem off in general.

The error window only stays up for a few seconds which makes it difficult to read. I have attached a screenshot. The console throws Error parsing row 1317: Too few fields: expected 7 fields but parsed 1

Line 1317 is midway through the text of a secure note. The line numbers indicated in the attached screenshot are less than 100 characters away from the beginning of the notes field.

I will try removing lines until it works and then post a reproducible case here or in a new bug.

lastpass_import

@kspearrin
Copy link
Member

@gardner Sounds like you may have a malformed export from LastPass. It's been known to break. Are you able to open this CSV in a spreadsheet program like Excel and view it's contents correctly?

@gardner
Copy link

gardner commented Sep 27, 2017

Yes. I looked for passwords that are longer than 300 characters but everything seemed less than 150 characters. Is there a way to check out the code and feed input files to the unit tests so that I can automate the search. i.e. remove a single line at a time and rerun the tests in an automated fashion to find the offending line?

It seems like this is an opportunity to improve the import parser to deal with more exceptions that may or may not be intentionally produced by LastPass export.

Just to be clear: my motivation for this is that I feel like Bitwarden's Open Source commitment aligns with my personal values and the commercial support from the company backs me in recommending it to organizations. I just signed up for a year personal and I am blocked on importing my LastPass export. I am a developer who is keen to submit a PR if I can find out what is causing it and I am able to improve the import code.

Thanks

@kspearrin
Copy link
Member

@gardner It's not passwords that are the problem. According to your error message it's the notes field for several rows in the export. In excel look for rows 1100-1300 range for massive notes.

@gardner
Copy link

gardner commented Sep 27, 2017

The offending lines are 4k GPG keypairs that sometimes take up around 10k characters. I guess I have to break these up into different secure notes? Is there a way to increase the 10000 character limit?

@kspearrin
Copy link
Member

kspearrin commented Sep 27, 2017

@gardner To store something of that size you will need to use file attachments. We don't intend for data of that size to be in a standard text field.

If you want to try and break them up into multiple entries as a workaround you could, but that doesn't seem like a very good experience.

Also worth noting is that the 10k limit is on the encrypted size, not unencrypted. I'd imagine 4-5k characters equates to 10k encrypted characters.

@gardner
Copy link

gardner commented Dec 9, 2017

Just checking back in: I really like BitWarden's FOSS model and I run it on my personal machine with a yearly subscription. I recommended BW to the company that I work with. This issue ultimately led to the company looking at various password managers and going with a different solution. I wish that I had the time to help!

@lastpassgithub
Copy link

Can you advise how to import notes from another application into Lastpass - say as Secure Note, so I can have everything in Lastpass? I have already set up a password vault and don't want to interfere with that. I have the Notes as a CSV with 3 columns - Last Name, First Name and Note. Currently Secure Notes are empty.

Alternatively how to import Notes into the Vault under Notes?

@gardner
Copy link

gardner commented Mar 21, 2019

@lastpassgithub this is not the right place to ask support questions for LastPass. This is a bug tracker for BitWarden. You can try using BitWarden instead of LastPass by downloading it here: https://bitwarden.com/

If you have questions about LastPass then I would suggest that you contact that company: https://lastpass.com/support.php

@shark-horse
Copy link

FWIW, I have experienced the same symptoms as the OP when I export from Lastpass -> encrypted file, then import that encrypted file into another Lastpass account. So those symptoms are not necessarily indicative of anything related to bitwarden. HTH.

@shark-horse
Copy link

It looks like all of my secure notes of a custom type failed to import correctly, probably because those custom types have not been added to the new LastPass account.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants