[pmg-devel] [PATCH pmg-api 06/10] fix result verification for invalid mails

Dominik Csapak d.csapak at proxmox.com
Thu Sep 26 12:28:10 CEST 2019


in case we cannot parse the mail to produce any sensible html/text
output, we got a 'result verification error', instead show 'No Content'

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/PMG/API2/Quarantine.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PMG/API2/Quarantine.pm b/src/PMG/API2/Quarantine.pm
index feae798..9d85370 100644
--- a/src/PMG/API2/Quarantine.pm
+++ b/src/PMG/API2/Quarantine.pm
@@ -851,7 +851,7 @@ __PACKAGE__->register_method ({
 	    my $viewimages = $cfg->get('spamquar', 'viewimages');
 	    my $allowhref = $cfg->get('spamquar', 'allowhrefs');
 
-	    $res->{content} = PMG::HTMLMail::email_to_html($path, $raw, $viewimages, $allowhref);
+	    $res->{content} = PMG::HTMLMail::email_to_html($path, $raw, $viewimages, $allowhref) // 'No Content';
 
 	    # to make result verification happy
 	    $res->{file} = '';
-- 
2.20.1




More information about the pmg-devel mailing list