From 256d4333c6ed99838c6bd7f99ef451562fc895a4 Mon Sep 17 00:00:00 2001 From: Calvo Date: Fri, 16 Apr 2021 15:36:12 +0200 Subject: [PATCH] Fixed encoding ampersand on mail alerts --- pandora_server/lib/PandoraFMS/Core.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 40cd75f4d9..19aaeb8228 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -1322,6 +1322,9 @@ sub pandora_execute_action ($$$$$$$$$;$) { my $cid_data = "CID_IMAGE"; my $dataname = "CID_IMAGE.png"; + # Decode ampersand. Used for macros with encoded names. + $field3 =~ s/&/&/g; + if (defined($data) && $data =~ /^data:image\/png;base64, /) { # macro _data_ substitution in case is image. $attach_data_as_image = 1;