diff --git a/.gitignore b/.gitignore index 274e3a3f..3317dca5 100644 --- a/.gitignore +++ b/.gitignore @@ -157,6 +157,7 @@ inc/calendar/tcal.php inc/database.inc.php inc/database_mysqli.inc.php inc/footer.inc.php +inc/htmlpurifier inc/index.htm inc/mail/email_parser.php inc/mail/hesk_pipe.php diff --git a/admin/admin_main.php b/admin/admin_main.php index d80579b7..26043f00 100644 --- a/admin/admin_main.php +++ b/admin/admin_main.php @@ -1,7 +1,7 @@ -
@@ -2746,7 +2746,7 @@ if (defined('HESK_DEMO')) { + cols="40">
@@ -2786,7 +2786,7 @@ if (defined('HESK_DEMO')) { } ?>/> + class="form-control"> diff --git a/admin/admin_settings_save.php b/admin/admin_settings_save.php index f35656c8..4b9cb092 100644 --- a/admin/admin_settings_save.php +++ b/admin/admin_settings_save.php @@ -1,7 +1,7 @@
-

> 

+

> 

diff --git a/admin/knowledgebase_private.php b/admin/knowledgebase_private.php index c6f1f4d8..5aa3769a 100644 --- a/admin/knowledgebase_private.php +++ b/admin/knowledgebase_private.php @@ -1,7 +1,7 @@ - : /> + : />
diff --git a/admin/lock.php b/admin/lock.php index 8f8d5d6d..9ba669a2 100644 --- a/admin/lock.php +++ b/admin/lock.php @@ -1,7 +1,7 @@ +hesk_process_messages($tmp, 'admin_ticket.php?track=' . $trackingID . '&Refresh=' . rand(10000, 99999), 'SUCCESS'); \ No newline at end of file diff --git a/admin/mail.php b/admin/mail.php index 2f8df755..7c925a5f 100644 --- a/admin/mail.php +++ b/admin/mail.php @@ -1,7 +1,7 @@ purify($content); } else { @@ -1969,6 +1974,11 @@ function new_article() } $content = hesk_getHTML( hesk_POST('content') ); + + // Clean the HTML code + require(HESK_PATH . 'inc/htmlpurifier/HTMLPurifier.standalone.php'); + $purifier = new HTMLPurifier(); + $content = $purifier->purify($content); } else { @@ -2211,7 +2221,7 @@ function show_treeMenu() { =
=
=
- (1, 2, 3) =
+ (1, 2, 3) =
-

+

@@ -486,11 +484,15 @@ function save_sm() $icon = hesk_POST('icon'); $title = hesk_input(hesk_POST('title')) or $hesk_error_buffer[] = $hesklang['sm_e_title']; $message = hesk_getHTML(hesk_POST('message')); + + // Clean the HTML code + require(HESK_PATH . 'inc/htmlpurifier/HTMLPurifier.standalone.php'); + $purifier = new HTMLPurifier(); + $message = $purifier->purify($message); // Any errors? if (count($hesk_error_buffer)) { $_SESSION['edit_sm'] = true; - $hesklang['new_sm'] = $hesklang['edit_sm']; $_SESSION['new_sm'] = array( 'id' => $id, @@ -515,7 +517,6 @@ function save_sm() if (isset($_POST['sm_preview'])) { $_SESSION['preview_sm'] = true; $_SESSION['edit_sm'] = true; - $hesklang['new_sm'] = $hesklang['edit_sm']; $_SESSION['new_sm'] = array( 'id' => $id, @@ -563,8 +564,6 @@ function edit_sm() $_SESSION['new_sm'] = $sm; $_SESSION['edit_sm'] = true; - $hesklang['new_sm'] = $hesklang['edit_sm']; - } // End edit_sm() @@ -654,6 +653,11 @@ function new_sm() $icon = hesk_POST('icon'); $title = hesk_input(hesk_POST('title')) or $hesk_error_buffer[] = $hesklang['sm_e_title']; $message = hesk_getHTML(hesk_POST('message')); + + // Clean the HTML code + require(HESK_PATH . 'inc/htmlpurifier/HTMLPurifier.standalone.php'); + $purifier = new HTMLPurifier(); + $message = $purifier->purify($message); // Any errors? if (count($hesk_error_buffer)) { diff --git a/admin/show_tickets.php b/admin/show_tickets.php index 93935495..84f34e79 100644 --- a/admin/show_tickets.php +++ b/admin/show_tickets.php @@ -1,7 +1,7 @@ '', 'archive.php' => '', 'assign_owner.php' => '', + 'banned_emails.php' => '', + 'banned_ips.php' => '', 'change_status.php' => '', 'edit_post.php' => '', + 'email_templates.php' => '', 'export.php' => '', 'find_tickets.php' => '', 'generate_spam_question.php' => '', @@ -593,10 +599,12 @@ function hesk_verifyGoto() 'manage_canned.php' => '', 'manage_categories.php' => '', 'manage_knowledgebase.php' => '', + 'manage_ticket_templates.php' => '', 'manage_users.php' => '', 'new_ticket.php' => '', 'profile.php' => '', 'reports.php' => '', + 'service_messages.php' => '', 'show_tickets.php' => '', ); diff --git a/inc/attachments.inc.php b/inc/attachments.inc.php index 3f460d00..89761a5e 100644 --- a/inc/attachments.inc.php +++ b/inc/attachments.inc.php @@ -1,7 +1,7 @@ '2.6.1', 29 => '2.6.2', 30 => '2.6.3', + 31 => '2.6.4', ); function echoInitialVersionRows($version, $build_to_version_map) diff --git a/install/mods-for-hesk/js/version-scripts.js b/install/mods-for-hesk/js/version-scripts.js index bd02e29a..10d012f3 100644 --- a/install/mods-for-hesk/js/version-scripts.js +++ b/install/mods-for-hesk/js/version-scripts.js @@ -86,6 +86,9 @@ function processUpdates(startingVersion) { } else if (startingVersion < 30) { startVersionUpgrade('263'); executeUpdate(30, '263', '2.6.3'); + } else if (startingVersion < 31) { + startVersionUpgrade('264'); + executeUpdate(31, '264', '2.6.4'); } else { installationFinished(); } diff --git a/install/mods-for-hesk/modsForHesk.php b/install/mods-for-hesk/modsForHesk.php index fc892928..d7c49c9f 100644 --- a/install/mods-for-hesk/modsForHesk.php +++ b/install/mods-for-hesk/modsForHesk.php @@ -117,6 +117,7 @@ hesk_dbConnect();