From a763609b6c8c6bbff31ed074e4b80215d045b6cb Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 19 Sep 2019 06:27:05 -0600 Subject: [PATCH] Fax Server: Token integration. --- app/fax/fax_edit.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/fax/fax_edit.php b/app/fax/fax_edit.php index f21c48eac6..24e6e857a6 100644 --- a/app/fax/fax_edit.php +++ b/app/fax/fax_edit.php @@ -204,6 +204,14 @@ $fax_uuid = $_POST["fax_uuid"]; } + //validate the token + $token = new token; + if (!$token->validate($_SERVER['PHP_SELF'])) { + message::add($text['message-invalid_token'],'negative'); + header('Location: fax.php'); + exit; + } + //check for all required data if (strlen($fax_extension) == 0) { $msg .= "".$text['confirm-ext']."
\n"; } if (strlen($fax_name) == 0) { $msg .= "".$text['confirm-fax']."
\n"; } @@ -438,6 +446,10 @@ $dialplan_uuid = uuid(); } +//create token + $object = new token; + $token = $object->create($_SERVER['PHP_SELF']); + //show the header require_once "resources/header.php"; @@ -796,6 +808,7 @@ echo " \n"; echo " \n"; } + echo " \n"; echo " \n"; echo " \n"; echo " ";