From ebd0e986ed11f2a34fb58cdd33efbfab192083ad Mon Sep 17 00:00:00 2001 From: Till Brehm <tbrehm@ispconfig.org> Date: Fri, 22 Apr 2016 05:26:17 -0400 Subject: [PATCH] Added PHP 7 check in installer and updater. --- interface/web/dns/dns_wizard.php | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/interface/web/dns/dns_wizard.php b/interface/web/dns/dns_wizard.php index 14ffe5b..b950f29 100644 --- a/interface/web/dns/dns_wizard.php +++ b/interface/web/dns/dns_wizard.php @@ -81,7 +81,7 @@ $app->tpl->setVar("server_id", $server_id_option); // load the list of clients - $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY sys_group.name"; + $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY client.company_name, client.contact_name, sys_group.name"; $clients = $app->db->queryAllRecords($sql); $client_select = ''; if($_SESSION["s"]["user"]["typ"] == 'admin') $client_select .= "<option value='0'></option>"; @@ -103,7 +103,7 @@ // load the list of clients - $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$app->functions->intval($client['client_id']); + $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$app->functions->intval($client['client_id'])." ORDER BY client.company_name, client.contact_name, sys_group.name"; $clients = $app->db->queryAllRecords($sql); $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".$app->functions->intval($client['client_id'])); $client_select = '<option value="'.$tmp['groupid'].'">'.$client['contactname'].'</option>'; @@ -129,7 +129,10 @@ } if($_POST['create'] == 1) { - + + //* CSRF Check + $app->auth->csrf_token_check(); + $error = ''; // apply filters @@ -287,6 +290,11 @@ $app->tpl->setVar("title", 'DNS Wizard'); +//* SET csrf token +$csrf_token = $app->auth->csrf_token_get('dns_wizard'); +$app->tpl->setVar('_csrf_id',$csrf_token['csrf_id']); +$app->tpl->setVar('_csrf_key',$csrf_token['csrf_key']); + $lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_dns_wizard.lng'; include $lng_file; $app->tpl->setVar($wb); -- Gitblit v1.9.1