[pmg-devel] [PATCH pmg-api] fix 4006: do not split from header on ', ' for spamreport mails

Dominik Csapak d.csapak at proxmox.com
Tue Nov 15 15:19:19 CET 2022


LGTM

Tested-by: Dominik Csapak <d.csapak at proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak at proxmox.com>

On 11/15/22 10:28, Stoiko Ivanov wrote:
> This commit follows 0f123331c73bbcb73303f1f07b5318a68c83ad64, which
> did the same change for the API calls.
> 
> Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
> ---
>   src/PMG/CLI/pmgqm.pm | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/src/PMG/CLI/pmgqm.pm b/src/PMG/CLI/pmgqm.pm
> index 1e21bf0..dbec8ef 100755
> --- a/src/PMG/CLI/pmgqm.pm
> +++ b/src/PMG/CLI/pmgqm.pm
> @@ -46,8 +46,7 @@ sub get_item_data {
>       $item->{subject} = PMG::Utils::rfc1522_to_html(
>   	PVE::Tools::trim($head->get('subject')) || 'No Subject');
>   
> -    my @fromarray = split('\s*,\s*', $head->get('from') || $ref->{sender});
> -    my $from = PMG::Utils::rfc1522_to_html(PVE::Tools::trim($fromarray[0]));
> +    my $from = PMG::Utils::rfc1522_to_html(PVE::Tools::trim($head->get('from') // $ref->{sender}));
>       my $sender = PMG::Utils::rfc1522_to_html(PVE::Tools::trim($head->get('sender')));
>   
>       if ($sender) {





More information about the pmg-devel mailing list