From 921f1cd2cf912ff8db0ac7bee32ab519749412ec Mon Sep 17 00:00:00 2001 From: osmiy Date: Fri, 22 Jun 2007 12:55:36 +0000 Subject: - minor changes (Eugene) git-svn-id: svn://svn.zabbix.com/trunk@4349 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/include/nodes.inc.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'frontends/php/include/nodes.inc.php') diff --git a/frontends/php/include/nodes.inc.php b/frontends/php/include/nodes.inc.php index 967e2421..c1e8d6b2 100644 --- a/frontends/php/include/nodes.inc.php +++ b/frontends/php/include/nodes.inc.php @@ -50,6 +50,12 @@ { global $ZBX_CURNODEID, $ZBX_CURMASTERID; + if( !eregi('^'.ZBX_EREG_NODE_FORMAT.'$', $name) ) + { + error("Incorrect characters used for Node name"); + return false; + } + switch($node_type) { case ZBX_NODE_REMOTE: @@ -97,6 +103,12 @@ function update_node($nodeid,$new_nodeid,$name,$timezone,$ip,$port,$slave_history,$slave_trends) { + if( !eregi('^'.ZBX_EREG_NODE_FORMAT.'$', $name) ) + { + error("Incorrect characters used for Node name"); + return false; + } + $result = DBexecute('update nodes set nodeid='.$new_nodeid.',name='.zbx_dbstr($name).','. 'timezone='.$timezone.',ip='.zbx_dbstr($ip).',port='.$port.','. 'slave_history='.$slave_history.',slave_trends='.$slave_trends. -- cgit