From 4ee4c801fa965c2e056d056eeda90b5d0a9eb752 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Thu, 30 Dec 2010 17:49:39 -0500 Subject: [PATCH] require openpgp4fpr to be a full fingerprint and standardize internally on upper-case hexdigits --- Crypt/Monkeysphere/MSVA.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Crypt/Monkeysphere/MSVA.pm b/Crypt/Monkeysphere/MSVA.pm index ed72f4d..0133ff4 100755 --- a/Crypt/Monkeysphere/MSVA.pm +++ b/Crypt/Monkeysphere/MSVA.pm @@ -711,8 +711,8 @@ my $key; my $gpgquery; if (lc($data->{pkc}->{type}) eq 'openpgp4fpr') { - if ($data->{pkc}->{data} =~ /^(0x)?([[:xdigit:]]+)$/) { - $data->{pkc}->{data} = $2; + if ($data->{pkc}->{data} =~ /^(0x)?([[:xdigit:]]{40})$/) { + $data->{pkc}->{data} = uc($2); $fpr = $data->{pkc}->{data}; msvalog('verbose', "OpenPGP v4 fingerprint: %s\n",$fpr); } else { -- 2.26.2