From bdafada8f59700c32e90504241752bcfb164ff77 Mon Sep 17 00:00:00 2001 From: Jameson Rollins Date: Fri, 31 Dec 2010 01:29:26 -0500 Subject: [PATCH] check that key data is not empty, and return error otherwise. --- Crypt/Monkeysphere/MSVA.pm | 6 ++++++ 1 file changed, 6 insertions(+) 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; -- 2.26.2