From e41ec5848f21015068255c1d61d01edf442e8e7e Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Wed, 12 Mar 2014 11:35:57 -0300 Subject: Improve checks for params 'id', 'dup' and other similar ones to make sure they are numeric integer, also, pass them through htmlspecialchars() before print --- usr/local/www/load_balancer_relay_action_edit.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr/local/www/load_balancer_relay_action_edit.php') diff --git a/usr/local/www/load_balancer_relay_action_edit.php b/usr/local/www/load_balancer_relay_action_edit.php index edbea87..51f5245 100755 --- a/usr/local/www/load_balancer_relay_action_edit.php +++ b/usr/local/www/load_balancer_relay_action_edit.php @@ -45,10 +45,10 @@ if (!is_array($config['load_balancer']['lbaction'])) { } $a_action = &$config['load_balancer']['lbaction']; -if (isset($_POST['id'])) - $id = $_POST['id']; -else +if (is_numericint($_GET['id'])) $id = $_GET['id']; +if (isset($_POST['id']) && is_numericint($_POST['id'])) + $id = $_POST['id']; if (isset($id) && $a_action[$id]) { $pconfig = array(); -- cgit v1.1