diff options
author | Jameson Graef Rollins <jrollins@phys.columbia.edu> | 2008-08-18 10:13:42 -0700 |
---|---|---|
committer | Jameson Graef Rollins <jrollins@phys.columbia.edu> | 2008-08-18 10:13:42 -0700 |
commit | cbcc9ff2a7cf6b398a977a873c5c85db36ba05fd (patch) | |
tree | 4f83b124caa540c21763420e26d880e3864f4620 /src/common | |
parent | 0e12dd66f1d450d773c5e4403739371ef03860a8 (diff) |
fixed bad bug in user id processing that prevented bad primary keys
from being properly handled.
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common | 25 |
1 files changed, 10 insertions, 15 deletions
@@ -393,29 +393,24 @@ process_user_id() { ;; 'uid') # user ids if [ "$lastKey" != pub ] ; then - log " - got a user ID after a sub key! user IDs should only follow primary keys!" - continue - fi - # don't bother with a uid if there is no valid or reasonable primary key. - if [ "$keyOK" != true ] ; then + log " - got a user ID after a sub key?! user IDs should only follow primary keys!" continue fi # if an acceptable user ID was already found, skip - if [ "$uidOK" ] ; then - continue - fi - # if the user ID does not match, skip - if [ "$(echo "$uidfpr" | gpg_unescape)" != "$userID" ] ; then + if [ "$uidOK" = 'true' ] ; then continue fi - # if the user ID validity is not ok, skip - if [ "$validity" != 'u' -a "$validity" != 'f' ] ; then + # if the user ID does matches... + if [ "$(echo "$uidfpr" | gpg_unescape)" = "$userID" ] ; then + # and the user ID validity is ok + if [ "$validity" != 'u' -a "$validity" != 'f' ] ; then + # mark user ID acceptable + uidOK=true + fi + else continue fi - # mark user ID acceptable - uidOK=true - # output a line for the primary key # 0 = ok, 1 = bad if [ "$keyOK" -a "$uidOK" -a "$lastKeyOK" ] ; then |