From 8ee6e1a55f91589c81a9eec4076cc425d7d52efd Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Wed, 6 Dec 2017 12:18:17 -0500 Subject: [PATCH 1/5] Can't concatenate an array to a string --- api/BusinessLogic/Emails/BasicEmailSender.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/BusinessLogic/Emails/BasicEmailSender.php b/api/BusinessLogic/Emails/BasicEmailSender.php index 8ab1c37d..d29f34af 100644 --- a/api/BusinessLogic/Emails/BasicEmailSender.php +++ b/api/BusinessLogic/Emails/BasicEmailSender.php @@ -10,7 +10,8 @@ use PHPMailer; class BasicEmailSender extends \BaseClass implements EmailSender { function sendEmail($emailBuilder, $heskSettings, $modsForHeskSettings, $sendAsHtml) { - if (preg_match("/\n|\r|\t|%0A|%0D|%08|%09/", $emailBuilder->to . $emailBuilder->subject)) { + $toEmails = implode(',', $emailBuilder->to); + if (preg_match("/\n|\r|\t|%0A|%0D|%08|%09/", $toEmails . $emailBuilder->subject)) { return false; } From 878b2aa09662a468bad1c9441f9fa17a4400c4e9 Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Wed, 6 Dec 2017 12:45:44 -0500 Subject: [PATCH 2/5] Fix headers --- api/autoload.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/api/autoload.php b/api/autoload.php index 0f14ff20..33ac8300 100644 --- a/api/autoload.php +++ b/api/autoload.php @@ -23,4 +23,17 @@ require_once(__DIR__ . '/../inc/custom_fields.inc.php'); // Load the ApplicationContext $builder = new \DI\ContainerBuilder(); -$applicationContext = $builder->build(); \ No newline at end of file +$applicationContext = $builder->build(); + +// Fix for getallheaders() on PHP-FPM and nginx +if (!function_exists('getallheaders')) { + function getallheaders() { + $headers = []; + foreach ($_SERVER as $name => $value) { + if (substr($name, 0, 5) == 'HTTP_') { + $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value; + } + } + return $headers; + } +} \ No newline at end of file From 95342815e2b3a1c8481303eea64c7767260e8c33 Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Wed, 6 Dec 2017 12:52:02 -0500 Subject: [PATCH 3/5] Update installer --- install/index.php | 2 +- install/migrations/core.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/install/index.php b/install/index.php index 6ee2fc35..e6199ac3 100644 --- a/install/index.php +++ b/install/index.php @@ -100,7 +100,7 @@ if (HESK_NEW_VERSION != $hesk_settings['hesk_version']) {
-

You need to be running HESK 2.7.3 to install Mods for HESK. You currently have HESK .

+

You need to be running HESK to install Mods for HESK. You currently have HESK .