diff --git a/app/gateways/gateway_edit.php b/app/gateways/gateway_edit.php index cbff121b40..3085158a38 100644 --- a/app/gateways/gateway_edit.php +++ b/app/gateways/gateway_edit.php @@ -115,6 +115,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: gateways.php'); + exit; + } + //check for all required data $msg = ''; if (strlen($gateway) == 0) { $msg .= $text['message-required']." ".$text['label-gateway']."
\n"; } @@ -299,6 +307,10 @@ if (strlen($register) == 0) { $register = "true"; } if (strlen($retry_seconds) == 0) { $retry_seconds = "30"; } +//create token + $object = new token; + $token = $object->create($_SERVER['PHP_SELF']); + //show the header require_once "resources/header.php"; @@ -831,6 +843,7 @@ if ($action == "update") { echo " \n"; } + echo " \n"; echo "
"; echo " \n"; echo " \n";