From 6ecb7df37a68f2c98b4f03adc6393ce0f6b22727 Mon Sep 17 00:00:00 2001 From: thijs Date: Wed, 27 Feb 2008 10:24:38 +0000 Subject: [PATCH] * keylookup: cope with 16 or 40 nibble keyids, thanks Philippe Teuwen (Closes: #466716). git-svn-id: svn://svn.debian.org/pgp-tools/trunk@362 b513b33f-fedd-0310-b452-c3deb5f4c849 --- debian/changelog | 9 +++++++-- keylookup/keylookup | 5 +++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index fbfd512..1f30d02 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 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 Wed, 27 Feb 2008 11:23:33 +0100 signing-party (0.4.13-1) unstable; urgency=low diff --git a/keylookup/keylookup b/keylookup/keylookup index a8754d3..a69f888 100755 --- a/keylookup/keylookup +++ b/keylookup/keylookup @@ -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; $_ } ; 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; -- 2.39.5