Menu

#2214 Import LastPass CSV wrongly escapes ampersand

KeePass_2.x
closed
nobody
None
5
2016-12-16
2016-06-27
No

Discussion

  • Paul

    Paul - 2016-06-28

    Are you sure KeePass gets the ampersand wrong in an import, maybe your export had the ampersand escaped. Can you post a sample of your export?

    cheers, Paul

    p.s. KeePass is avaliable in many forms, not just 2, but only KeePass (for Windows) is created by the KeePass author.

     
  • Michael Vorburger

    I just rechecked, and found that indeed you are correct, the & is of course being added by the LastPass CSV export, not the KeepPass CSV import .. so they are doing XML escaping in CSV, which seems like a bug on their side, huh? Not sure what you want to do with this then? No offense taken if you just close it. I don't think raising this with LastPass support has any chance of getting fixed on their side? If you want to be extra nice and make migration from LP to KP smoother, you could of course unescape & back to & during LP CSV import code in KP .. fully undrestand that this would be working around a bug in another product. Your call! Tx.

     
  • Paul

    Paul - 2016-06-28

    Depends when the change to the export behaviour occured - i can't recall this error reported earlier.
    Can you post a sample line with an ampersand in it?
    What version of LP?

    cheers, Paul

     
  • Paul

    Paul - 2016-06-28

    Is your data in this format?

    http://127.0.0.1:9999,JWvanLohuizen,password,,127.0.0.1,Computer,0
    

    There should be no need to escape an ampersand as the commas are sufficient, but commas will need to be escaped.
    Sounds like a change to the LP export format?

    cheers, Paul

     
  • Michael Vorburger

    What version of LP?
    LastPass Chrome Toolbar (Browser Extension) Version 4.1.17 Built 2016-06-23 does this.

    Is your data in this format?
    Yep, that look about right. The first line is:
    url,username,password,extra,name,grouping,fav

    There should be no need to escape an ampersand as the commas are sufficient
    Agreed.

    but commas will need to be escaped.
    They seem to do that correctly (passwords containing commas are between double quotes.

    Sounds like a change to the LP export format?
    Agreed, this is a bug on their side. Maybe depending on which LastPass one uses, this isn't always consistent ... think Chrome plugin VS Windows App VS Firefox. I don't know.

     
  • Paul

    Paul - 2016-06-28

    passwords containing commas are between double quotes

    Nice of them to be consistent. :)

    cheers, Paul

     
  • Dominik Reichl

    Dominik Reichl - 2016-12-16
    • status: open --> closed
    • Group: KeePass_1.x --> KeePass_2.x
     
  • Dominik Reichl

    Dominik Reichl - 2016-12-16

    I tested this today and indeed, the Chrome extension of LastPass still encodes &, < and > as XML entities when exporting to a CSV file; the web version and the Firefox extension do not do this.

    I've now enhanced the LastPass CSV import module to decode these three entities.

    Here's the latest development snapshot for testing:
    http://keepass.info/filepool/KeePass_161216.zip

    Moving to closed feature requests.

    Thanks and best regards,
    Dominik

     
  • Dominik Reichl

    Dominik Reichl - 2016-12-16

    Ticket moved from /p/keepass/bugs/1539/

     

Log in to post a comment.