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";