jaromail

a commandline tool to easily and privately handle your e-mail
git clone git://parazyd.org/jaromail.git
Log | Files | Refs | Submodules | README

commit 1f8579ae318308371ddc8b85ec954625c25e91ad
parent 8090927057f5d850e534153ec78c78a52f104258
Author: Jaromil <jaromil@dyne.org>
Date:   Wed, 11 Dec 2013 14:26:07 +0100

changed hashing for local keyring entries to be more unique

Diffstat:
Msrc/zlibs/accounts | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/zlibs/accounts b/src/zlibs/accounts @@ -213,8 +213,9 @@ ask_password() { fi return 0 elif [ -r $KEYRING ]; then - func "Looking for password in local keyring for $email on $host over $type" - _hash=`print "$type:$email:$host" | shasum | awk '{print $1}'` + func "Looking for password in local keyring for $type account $account on $host" + func "new pass hash for: $type:$login:$host" + _hash=`print "$type:$login:$host" | shasum | awk '{print $1}'` lookup="`lookup_secret ${_hash}`" { test "$lookup" = "" } || { act "Saved password found for $email ($transport on $host)" @@ -249,7 +250,7 @@ EOF } new_password() { - notice "Setting a new password for $type account: $name" + notice "Setting a new password for $type account $account on $host" act "please enter password for username '$login'" password=`pin_entry $login $host` res=0 @@ -323,8 +324,9 @@ CREATE TABLE secrets EOF } # calculate the hash for this entry - _hash=`print "$type:$email:$host" | shasum | awk '{print $1}'` + _hash=`print "$type:$login:$host" | shasum | awk '{print $1}'` # check if the entry is already present + func "new pass hash for: $type:$login:$host" lookup="`lookup_secret ${_hash} rowid`" notice "Select the password to lock this keyring entry:" _password="`print $password | gpg -c --cipher-algo AES256 --openpgp --no-options | base64`"