marcwebbie / passpie

:closed_lock_with_key: Multiplatform command-line password manager
http://passpie.readthedocs.org/
MIT License
921 stars 68 forks source link

'passpie ubdate' is not working properly #100

Closed jeffisabelle closed 8 years ago

jeffisabelle commented 8 years ago

Hi,

I have been using passpie for a while, recently I figured out that passpie update cli command is not working properly. I did test this on passpie version 1.4.1 on both mac and ubuntu.

I manually dropped to the debugger and find out that the problem is on database.py in following lines;

def update(self, fullname, values):
    values['fullname'] = make_fullname(values["login"], values["name"])
    values['modified'] = datetime.now()
    self.table().update(values, (where("fullname") == fullname))

here on the last line, we are querying the db with fullname, but we are passing the fullname parameter that is not went through make_fullname function. so changing the last line from this;

    self.table().update(values, (where("fullname") == fullname))

to this,

    self.table().update(values, (where("fullname") == values['fullname']))

fixed the problem for me, but I'm not sure if this is the way it supposed to work.

I have imported my database from an older version of passpie, that might cause the problem too.

Thanks

wakatara commented 8 years ago

+1 Yup... the update command it definitely not working for me either. I have never imported and am using a fresh copy of passpie on a new machine (and have the files for passpie pointed to on a symlink to dropbox from my home directory.).

OSX El Capitan 10.11.5 Also using 1.4.1 passpie via homebrew Python 2.7.11 via homebrew Also, Python 3.5.1 via homebrew

marcwebbie commented 8 years ago

Hello @jeffisabelle and @wakatara,

Could you tell me what version of passpie you have installed and also, what are the commands you are running?

I've updated a credential successfully:

screen shot 2016-05-22

Thanks for opening this issue.

marcwebbie commented 8 years ago

Yes,

I could reproduce this issue updating a credential passing only name:

passpie update bar

instead of full fullname:

passpie update foo@bar

Patched 1.4.2 is now on pypi(pip install -U passpie), and pull request submitted to homebrew

Thanks for your contribution