fixed bad bug in user id processing that prevented bad primary keys
authorJameson Graef Rollins <jrollins@phys.columbia.edu>
Mon, 18 Aug 2008 17:13:42 +0000 (10:13 -0700)
committerJameson Graef Rollins <jrollins@phys.columbia.edu>
Mon, 18 Aug 2008 17:13:42 +0000 (10:13 -0700)
from being properly handled.

debian/changelog
src/common

index ecb2f165ceca6b4e219600fe7a01e60e53b003b2..828973fff9a4fb94f7860054b39084122bf99cb9 100644 (file)
@@ -1,3 +1,10 @@
+monkeysphere (0.9-1) experimental; urgency=low
+
+  * fixed bug in user id processing that prevented bad primary keys from
+    being properly removed.
+
+ -- Jameson Graef Rollins <jrollins@phys.columbia.edu>  Mon, 18 Aug 2008 10:13:36 -0700
+
 monkeysphere (0.8-1) experimental; urgency=low
 
   [ Daniel Kahn Gillmor ]
index bb988f785e983ad5bcb90492f3390b618ce2c737..9a03b9ca8df08430bd64c894b1c5cc3612252990 100644 (file)
@@ -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