|
@@ -73,6 +73,14 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
|
$domain_uuid = $_POST["domain_uuid"];
|
|
$domain_uuid = $_POST["domain_uuid"];
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //validate the token
|
|
|
|
+ $token = new token;
|
|
|
|
+ if (!$token->validate($_SERVER['PHP_SELF'])) {
|
|
|
|
+ message::add($text['message-invalid_token'],'negative');
|
|
|
|
+ header('Location: domains.php');
|
|
|
|
+ exit;
|
|
|
|
+ }
|
|
|
|
+
|
|
//check for all required data
|
|
//check for all required data
|
|
if (strlen($domain_name) == 0) { $msg .= $text['message-required'].$text['label-name']."<br>\n"; }
|
|
if (strlen($domain_name) == 0) { $msg .= $text['message-required'].$text['label-name']."<br>\n"; }
|
|
//if (strlen($domain_description) == 0) { $msg .= $text['message-required'].$text['label-description']."<br>\n"; }
|
|
//if (strlen($domain_description) == 0) { $msg .= $text['message-required'].$text['label-description']."<br>\n"; }
|
|
@@ -483,6 +491,10 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
|
unset($sql, $parameters, $row);
|
|
unset($sql, $parameters, $row);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+//create token
|
|
|
|
+ $object = new token;
|
|
|
|
+ $token = $object->create($_SERVER['PHP_SELF']);
|
|
|
|
+
|
|
//show the header
|
|
//show the header
|
|
require_once "resources/header.php";
|
|
require_once "resources/header.php";
|
|
if ($action == "update") {
|
|
if ($action == "update") {
|
|
@@ -619,6 +631,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
|
if ($action == "update") {
|
|
if ($action == "update") {
|
|
echo " <input type='hidden' name='domain_uuid' value='".escape($domain_uuid)."'>\n";
|
|
echo " <input type='hidden' name='domain_uuid' value='".escape($domain_uuid)."'>\n";
|
|
}
|
|
}
|
|
|
|
+ echo " <input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
|
echo " <br />";
|
|
echo " <br />";
|
|
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
|
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
|
echo " </td>\n";
|
|
echo " </td>\n";
|