From: Daniel Kahn Gillmor Date: Thu, 30 Dec 2010 22:49:39 +0000 (-0500) Subject: require openpgp4fpr to be a full fingerprint and standardize internally on upper... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4ee4c801fa965c2e056d056eeda90b5d0a9eb752;p=monkeysphere-validation-agent.git require openpgp4fpr to be a full fingerprint and standardize internally on upper-case hexdigits --- 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 {