* keylookup: cope with 16 or 40 nibble keyids, thanks Philippe Teuwen
authorthijs <thijs@b513b33f-fedd-0310-b452-c3deb5f4c849>
Wed, 27 Feb 2008 10:24:38 +0000 (10:24 +0000)
committerthijs <thijs@b513b33f-fedd-0310-b452-c3deb5f4c849>
Wed, 27 Feb 2008 10:24:38 +0000 (10:24 +0000)
  (Closes: #466716).

git-svn-id: svn://svn.debian.org/pgp-tools/trunk@362 b513b33f-fedd-0310-b452-c3deb5f4c849

debian/changelog
keylookup/keylookup

index fbfd51251bd03460891ad39f6f72e9109d5ed20e..1f30d027308fb6a20b19d1f84bb6fdc76966286f 100644 (file)
@@ -1,9 +1,14 @@
-signing-party (0.4.13-2) unreleased/unstable; urgency=low
+signing-party (0.4.13-2) unreleased; urgency=low
 
+  [ Christoph Berg ]
   * gpglist: Do not barf on revokers (rvk). Thanks to Faidon Liambotis for
     spotting.
 
- -- Christoph Berg <myon@debian.org>  Mon, 18 Feb 2008 21:07:42 +0100
+  [ Thijs Kinkhorst ]
+  * keylookup: cope with 16 or 40 nibble keyids, thanks Philippe Teuwen
+    (Closes: #466716).
+
+ -- Thijs Kinkhorst <thijs@debian.org>  Wed, 27 Feb 2008 11:23:33 +0100
 
 signing-party (0.4.13-1) unstable; urgency=low
 
index a8754d3f48fffcc87c3e24679d4c3c044cffd819..a69f888ec8857a0eea50a2f0e9c3c14abd194b80 100755 (executable)
@@ -210,7 +210,8 @@ sub callDialog {
        
        my %unique;
        my @keys = grep { !$unique{$_}++ }
-               grep { /^[0-9A-Fa-f]{8}$/ }
+               # get the keyID; can be 8, 16 or 40 nibbles
+               grep { /^((([a-zA-Z0-9]{24})?[a-zA-Z0-9]{8})?[a-zA-Z0-9]{8})$/ }
                map { s/\s//g; $_ } <ERRFH>;
        wait;
 
@@ -296,7 +297,7 @@ sub importKeys {
        push @args,  '--recv-keys';
        for my $keyid (@$keyids) {
                # untaint keyids
-               my ($cleanid) = $keyid =~ /^([a-zA-Z0-9]{8})$/;
+               my ($cleanid) = $keyid =~ /^((([a-zA-Z0-9]{24})?[a-zA-Z0-9]{8})?[a-zA-Z0-9]{8})$/;
                warn ("keyid '$keyid' has unexpected format - skipping\n"), next
                        unless defined $cleanid;
                push @args, $cleanid;