diff --git a/app/ring_groups/ring_group_destination_edit.php b/app/ring_groups/ring_group_destination_edit.php index 622e1e45b0..2ed48fcc95 100644 --- a/app/ring_groups/ring_group_destination_edit.php +++ b/app/ring_groups/ring_group_destination_edit.php @@ -86,6 +86,14 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $ring_group_destination_uuid = $_POST["ring_group_destination_uuid"]; } + //validate the token + $token = new token; + if (!$token->validate($_SERVER['PHP_SELF'])) { + message::add($text['message-invalid_token'],'negative'); + header('Location: ring_groups.php'); + exit; + } + //check for all required data //if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-domain_uuid']."
\n"; } //if (strlen($ring_group_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-ring_group_uuid']."
\n"; } @@ -174,6 +182,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { unset($sql, $parameters, $row); } +//create token + $object = new token; + $token = $object->create($_SERVER['PHP_SELF']); + //show the header require_once "resources/header.php"; @@ -255,6 +267,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { if ($action == "update") { echo " \n"; } + echo " \n"; echo "
"; echo " \n"; echo " \n"; diff --git a/app/ring_groups/ring_group_edit.php b/app/ring_groups/ring_group_edit.php index e6b1c14f82..1b8c7e03ad 100644 --- a/app/ring_groups/ring_group_edit.php +++ b/app/ring_groups/ring_group_edit.php @@ -179,6 +179,14 @@ //process the HTTP POST 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: ring_groups.php'); + exit; + } + //check for all required data $msg = ''; if (strlen($ring_group_name) == 0) { $msg .= $text['message-name']."
\n"; } @@ -501,6 +509,10 @@ $sounds = new sounds; $sounds = $sounds->get(); +//create token + $object = new token; + $token = $object->create($_SERVER['PHP_SELF']); + //show the header require_once "resources/header.php"; @@ -938,6 +950,7 @@ if (is_uuid($ring_group_uuid)) { echo " \n"; } + echo " \n"; echo "
"; echo " \n"; echo " \n";