From 7ef725d2577557724ad47af4725b9553c04a7d00 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 24 Nov 2009 07:03:49 +0000 Subject: [PATCH] Fixes for creating of new tasks (double escape breakes string) and mail debug code --- inc/functions.php | 8 ++++---- inc/mysql-manager.php | 8 +++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/inc/functions.php b/inc/functions.php index 8928e602fa..cc3c83d5f3 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -586,10 +586,10 @@ function sendEmail ($toEmail, $subject, $message, $isHtml = 'N', $mailHeader = ' if (isDebugModeEnabled()) { // In debug mode we want to display the mail instead of sending it away so we can debug this part outputHtml('
-Headers : ' . str_replace('<', '<', str_replace('>', '>', secureString(trim($mailHeader)))) . '
-To      : ' . $toEmail . '
-Subject : ' . $subject . '
-Message : ' . $message . '
+Headers : ' . htmlentities(trim($mailHeader)) . '
+To      : ' . htmlentities($toEmail) . '
+Subject : ' . htmlentities($subject) . '
+Message : ' . htmlentities($message) . '
 
'); } elseif (($isHtml == 'Y') && (isExtensionActive('html_mail'))) { // Send mail as HTML away diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index c9fad71c38..1e1069a6bd 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -2121,7 +2121,13 @@ function reduceRecipientReceivedMails ($column, $id, $count) { function createNewTask ($subject, $notes, $taskType, $userid = '0', $adminId = '0', $strip = true) { // Insert the task data into the database SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_task_system` (`assigned_admin`, `userid`, `status`, `task_type`, `subject`, `text`, `task_created`) VALUES (%s,%s,'NEW','%s','%s','%s', UNIX_TIMESTAMP())", - array($adminId, $userid, $taskType, $subject, escapeQuotes($notes)), __FUNCTION__, __LINE__, true, $strip); + array( + $adminId, + $userid, + $taskType, + $subject, + $notes + ), __FUNCTION__, __LINE__, true, $strip); } // Updates last module / online time -- 2.30.2