From: Daniel Kahn Gillmor Date: Tue, 12 Oct 2010 03:35:11 +0000 (-0400) Subject: only bother asking for a marginal UI if the UID of the corresponding key is not fully... X-Git-Tag: msva-perl_debian/0.5-1~1^2~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=83a448ebd61c8128a0221e9c643421129692ed5e;p=monkeysphere-validation-agent.git only bother asking for a marginal UI if the UID of the corresponding key is not fully valid --- diff --git a/Crypt/Monkeysphere/MSVA.pm b/Crypt/Monkeysphere/MSVA.pm index 7612ebd..8ae6b9b 100755 --- a/Crypt/Monkeysphere/MSVA.pm +++ b/Crypt/Monkeysphere/MSVA.pm @@ -593,14 +593,18 @@ } } - my $resp = Crypt::Monkeysphere::MSVA::MarginalUI->ask_the_user($gnupg, - $uid, - \@subvalid_key_fprs, - getpidswithsocketinode($clientinfo->{inode})); - msvalog('info', "response: %s\n", $resp); - if ($resp) { - $ret->{valid} = JSON::true; - $ret->{message} = sprintf('Manually validated "%s" through the OpenPGP Web of Trust.', $uid); + # only show the marginal UI if the UID of the corresponding + # key is not fully valid. + if (!$foundvalid) { + my $resp = Crypt::Monkeysphere::MSVA::MarginalUI->ask_the_user($gnupg, + $uid, + \@subvalid_key_fprs, + getpidswithsocketinode($clientinfo->{inode})); + msvalog('info', "response: %s\n", $resp); + if ($resp) { + $ret->{valid} = JSON::true; + $ret->{message} = sprintf('Manually validated "%s" through the OpenPGP Web of Trust.', $uid); + } } } } else {