diff --git a/app/fifo/fifo_add.php b/app/fifo/fifo_add.php
index 53c0cfe077..5877dc7414 100644
--- a/app/fifo/fifo_add.php
+++ b/app/fifo/fifo_add.php
@@ -62,6 +62,15 @@ else {
}
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
+
+ //validate the token
+ $token = new token;
+ if (!$token->validate($_SERVER['PHP_SELF'])) {
+ message::add($text['message-invalid_token'],'negative');
+ header('Location: dialplans.php');
+ exit;
+ }
+
//check for all required data
if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']."domain_uuid
\n"; }
if (strlen($extension_name) == 0) { $msg .= $text['message-required'].$text['label-name']."
\n"; }
@@ -280,6 +289,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
}
+//create token
+ $object = new token;
+ $token = $object->create($_SERVER['PHP_SELF']);
+
//show the content
echo "