[pass] Keepass import should include root-level entries

Stefan Simroth stefan.simroth at gmail.com
Thu Jan 30 20:03:30 CET 2014


Hi Erik,

Thanks for the fix!

I authored that script and I didn't have any passwords at the root level,
so I didn't recognize this.

Greetings,
Stefan
Am 28.01.2014 18:33 schrieb "Erik Mackdanz" <erikmack at gmail.com>:

> Hey, great project!  I was frustrated with the two password managers I've
> been using.  I thought about how I'd like a password manager to be
> designed, which involved small gpg-encrypted documents backed by git.  I'm
> glad I found your project before I launched into a new, unnecessary
> implementation.
>
> The contrib script for importing from keepass was skipping all my entries,
> which are stored at the Keepass root level.  The patch below fixed it.
>
> Repro steps:
> 1. In KeePass, add some entries as children of the root node
> 2. Export the KeePass to foo.xml
> 3. 'keepass2pass.py -f foo.xml'
> Expect: all entries imported
> Actual: root-level entries are skipped
>
> diff --git a/contrib/keepass2pass.py b/contrib/keepass2pass.py
> index 16764bd..80a2ad9 100755
> --- a/contrib/keepass2pass.py
> +++ b/contrib/keepass2pass.py
> @@ -90,6 +90,7 @@ def import_passwords(xml_file, root_path=None):
>          xml_tree = ElementTree.XML(text)
>          root = xml_tree.find('Root')
>          root_group = root.find('Group')
> +        import_group(entries,root_group,'')
>          if root_path is None: root_path = root_group.find('Name').text
>          groups = root_group.findall('Group')
>          for group in groups:
>
> Thanks, and keep it up!
>
> Erik
>
> _______________________________________________
> Password-Store mailing list
> Password-Store at lists.zx2c4.com
> http://lists.zx2c4.com/mailman/listinfo/password-store
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20140130/6751c7a0/attachment.html>


More information about the Password-Store mailing list