From: Jameson Rollins Date: Fri, 31 Dec 2010 06:29:26 +0000 (-0500) Subject: check that key data is not empty, and return error otherwise. X-Git-Url: http://git.tremily.us/?p=monkeysphere-validation-agent.git;a=commitdiff_plain;h=bdafada8f59700c32e90504241752bcfb164ff77 check that key data is not empty, and return error otherwise. --- diff --git a/Crypt/Monkeysphere/MSVA.pm b/Crypt/Monkeysphere/MSVA.pm index 74c5b17..f2bb7b1 100755 --- a/Crypt/Monkeysphere/MSVA.pm +++ b/Crypt/Monkeysphere/MSVA.pm @@ -649,6 +649,12 @@ message => 'Unknown failure', }; + # check that there actually is key data + if ($data->{pkc}->{data} eq '') { + $ret->{message} = sprintf("Key data empty."); + return $status,$ret; + } + # check context string if ($data->{context} =~ /^(https|ssh|smtp|ike|postgresql|imaps|imap|submission|e-mail)$/) { $data->{context} = $1;