diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-06-22 12:55:36 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-06-22 12:55:36 +0000 |
| commit | 921f1cd2cf912ff8db0ac7bee32ab519749412ec (patch) | |
| tree | f8a4344cd2a161e768508a786ca0e8baf94d0ab7 /frontends/php/include/nodes.inc.php | |
| parent | deb2121eb6ef46c74de6e677a1048248254cce01 (diff) | |
| download | zabbix-921f1cd2cf912ff8db0ac7bee32ab519749412ec.tar.gz zabbix-921f1cd2cf912ff8db0ac7bee32ab519749412ec.tar.xz zabbix-921f1cd2cf912ff8db0ac7bee32ab519749412ec.zip | |
- minor changes (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@4349 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/nodes.inc.php')
| -rw-r--r-- | frontends/php/include/nodes.inc.php | 12 |
1 files changed, 12 insertions, 0 deletions
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. |
