From 83a448ebd61c8128a0221e9c643421129692ed5e Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Mon, 11 Oct 2010 23:35:11 -0400 Subject: [PATCH] only bother asking for a marginal UI if the UID of the corresponding key is not fully valid --- Crypt/Monkeysphere/MSVA.pm | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) 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 { -- 2.26.2