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

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Sep 26 14:39:33 CEST 2019


On 9/26/19 12:28 PM, Dominik Csapak wrote:
> 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';

why not "unable to parse mail", still not telling to much about the system,
but it hints that the parsing failed not that the mail had no content.

>  
>  	    # to make result verification happy
>  	    $res->{file} = '';
> 




More information about the pmg-devel mailing list