From 52ea1cdd3fc65f367fe793d53fd712489e81c9d3 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 19 Sep 2019 08:10:24 -0600 Subject: [PATCH] Notifications: Token integration. --- core/notifications/notification_edit.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/core/notifications/notification_edit.php b/core/notifications/notification_edit.php index b24b2423a5..cbffb8ce14 100644 --- a/core/notifications/notification_edit.php +++ b/core/notifications/notification_edit.php @@ -52,6 +52,14 @@ else { if (count($_REQUEST) > 0) { + //validate the token + $token = new token; + if (!$token->validate($_SERVER['PHP_SELF'])) { + message::add($text['message-invalid_token'],'negative'); + header('Location: notification_edit.php'); + exit; + } + // prepare demographic information ********************************************** // fusionpbx version @@ -296,6 +304,10 @@ else { } +//create token + $object = new token; + $token = $object->create($_SERVER['PHP_SELF']); + require_once "resources/header.php"; $document['title'] = $text['title-notifications']; @@ -426,6 +438,7 @@ $document['title'] = $text['title-notifications']; echo "\n"; echo " \n"; echo " \n";
\n"; + echo " \n"; echo "
"; echo " \n"; echo "