diff --git a/app/sip_profiles/sip_profile_edit.php b/app/sip_profiles/sip_profile_edit.php
index 64feb0700d..d824e4cefb 100644
--- a/app/sip_profiles/sip_profile_edit.php
+++ b/app/sip_profiles/sip_profile_edit.php
@@ -70,6 +70,14 @@
$sip_profile_uuid = $_POST["sip_profile_uuid"];
}
+ //validate the token
+ $token = new token;
+ if (!$token->validate($_SERVER['PHP_SELF'])) {
+ message::add($text['message-invalid_token'],'negative');
+ header('Location: sip_profiles.php');
+ exit;
+ }
+
//check for all required data
$msg = '';
//if (strlen($sip_profile_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-sip_profile_uuid']."
\n"; }
@@ -235,6 +243,10 @@
$sip_profile_domains[$x]['sip_profile_domain_alias'] = '';
$sip_profile_domains[$x]['sip_profile_domain_parse'] = '';
+//create token
+ $object = new token;
+ $token = $object->create($_SERVER['PHP_SELF']);
+
//show the header
require_once "resources/header.php";
@@ -479,10 +491,11 @@
echo "