From 48830851b8c5b0dedb550d34859273cc0ed26cf8 Mon Sep 17 00:00:00 2001 From: Matthew Saunders Brown Date: Tue, 5 Dec 2023 11:56:32 -0800 Subject: [PATCH] strip newlines from mysql base64 encoded data before decoding --- panel/classes/Panel/Vmail/Autoresponders.php | 2 +- panel/classes/Panel/Vmail/AutorespondersEdit.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/panel/classes/Panel/Vmail/Autoresponders.php b/panel/classes/Panel/Vmail/Autoresponders.php index 1396330..42b8af3 100644 --- a/panel/classes/Panel/Vmail/Autoresponders.php +++ b/panel/classes/Panel/Vmail/Autoresponders.php @@ -66,7 +66,7 @@ class Autoresponders extends \Panel\Vmail { $subject = substr_replace($subject, "", -1); $autoresponder_array['subject'] = $subject; - $autoresponder_array['body'] = base64_decode($autoresponder_array['body']);; + $autoresponder_array['body'] = base64_decode(str_replace('\n', '', $autoresponder_array['body'])); $autoresponders_array[$k] = $autoresponder_array; diff --git a/panel/classes/Panel/Vmail/AutorespondersEdit.php b/panel/classes/Panel/Vmail/AutorespondersEdit.php index 97d14e7..2f498e0 100644 --- a/panel/classes/Panel/Vmail/AutorespondersEdit.php +++ b/panel/classes/Panel/Vmail/AutorespondersEdit.php @@ -26,7 +26,7 @@ class AutorespondersEdit extends \Panel\Vmail { $subject = substr_replace($subject, "", -1); $autoresponder_array[0]['subject'] = $subject; - $autoresponder_array[0]['body'] = base64_decode($autoresponder_array[0]['body']); + $autoresponder_array[0]['body'] = base64_decode(str_replace('\n', '', $autoresponder_array[0]['body'])); $autoresponders_array[0] = $autoresponder_array;