From ff15eca48e44c60af65887f84fa0afd7b469664f Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 17 Sep 2019 22:30:17 -0600 Subject: [PATCH] Destinations: Token integration. --- app/destinations/destination_edit.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php index 1fa0d04b57..90b9b89e71 100644 --- a/app/destinations/destination_edit.php +++ b/app/destinations/destination_edit.php @@ -135,6 +135,14 @@ $destination_context = $_SESSION['domain_name']; } + //validate the token + $token = new token; + if (!$token->validate($_SERVER['PHP_SELF'])) { + message::add($text['message-invalid_token'],'negative'); + header('Location: destinations.php'); + exit; + } + //check for all required data $msg = ''; if (strlen($destination_type) == 0) { $msg .= $text['message-required']." ".$text['label-destination_type']."
\n"; } @@ -790,6 +798,10 @@ if ($destination_type =="outbound") { $destination_context = $_SESSION['domain_name']; } if ($destination_type =="local") { $destination_context = $_SESSION['domain_name']; } +//create token + $object = new token; + $token = $object->create($_SERVER['PHP_SELF']); + //show the header require_once "resources/header.php"; if ($action == "update") { @@ -1180,6 +1192,7 @@ echo " \n"; echo " \n"; } + echo " \n"; echo "
"; echo " \n"; echo " \n";