Skip to content
This repository has been archived by the owner. It is now read-only.
Browse files

Store secure notes in the "launch" field as it's 256 vs 64 char

And secure notes are likely to be longer. Since whole file is encrypted
anyway, doesn't matter which field you use to store things in. Saves
patching PWman to make the password field accept more chars.

Add note to README regarding this known limitation.
  • Loading branch information...
atomicules committed Feb 3, 2013
1 parent e591129 commit 77ff43681e32fb1f9124fd55e306fab0e20d3beb
Showing with 10 additions and 3 deletions.
  1. +4 −0 README.markdown
  2. +6 −3 lastpass2pwman.lisp
@@ -11,3 +11,7 @@ Developed and tested in SBCL. Use as follows
sbcl --script /path/to/this/script <gpg id used with pwman> </path/to/lastpass/export>

The path to the Lastpass export is optional. If not supplied assumes file is called "lastpass.csv" and is in current directory. The script works by first exporting a plain text file called "pwman.txt" to current directory, however, this is then immediately encrypted via GPG and replaces the `.pwman.db` file. Both plain text files (the Lastpass export and `pwman.txt`) are then deleted - unless an error occurs with the encryption, in which case the script notifies the user and leaves the files.

## Known issues

PWman has a maximum password length of 64 characters therefore secure notes are stored in the launch field of PWman. Since the whole file is encrypted it doesn't really matter which field is used. The launch field allows up to 256 characters. If your secure notes are longer than this, then PWman will truncate them when saving. Also, note that although PWman will store 256 characters correctly it won't necessarily display them all correctly (the field was intended for displaying a single line of text), but the data will be in the file.
@@ -37,13 +37,16 @@
;Then loop through each entry in group
(loop for entry in groupentries
do (format stream
(xmls:toxml (fifth entry))
(xmls:toxml (first entry))
(xmls:toxml (second entry))
(if (null (third entry)) ;Secure Notes have no password
(xmls:toxml (fourth entry)) ;Use extra field if Secure Note
(xmls:toxml (third entry)))))
"" ;put nothing in pwman password field if Secure Note
(xmls:toxml (third entry)))
(if (null (third entry))
(xmls:toxml (fourth entry)) ;Use launch field for Secure Notes as it is longer
(format stream "</PwList>"))
(format stream "</PwList></PWMan_PasswordList>"))

0 comments on commit 77ff436

Please sign in to comment.
You can’t perform that action at this time.