diff options
author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2002-11-08 11:16:30 +0000 |
---|---|---|
committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2002-11-08 11:16:30 +0000 |
commit | a980d7a6e8b125cd6f0f54df0aa8b7f9e32ada0e (patch) | |
tree | 335161ebd1cdfb8934eaebf4922e69c28b8e8184 /frontends | |
parent | 61ff2202f1ed02303c75618f9692f0a7c7506a94 (diff) | |
download | zabbix-a980d7a6e8b125cd6f0f54df0aa8b7f9e32ada0e.tar.gz zabbix-a980d7a6e8b125cd6f0f54df0aa8b7f9e32ada0e.tar.xz zabbix-a980d7a6e8b125cd6f0f54df0aa8b7f9e32ada0e.zip |
- added validation of host name (Alexei)
- default value of StartSuckers is set to 4 (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@562 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/php/include/config.inc.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php index 532f8c14..47b56ded 100644 --- a/frontends/php/include/config.inc.php +++ b/frontends/php/include/config.inc.php @@ -2295,6 +2295,12 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid"; return 0; } + if (!eregi('^([0-9a-zA-Z\_\.-]+)$', $host, &$arr)) + { + $ERROR_MSG="Hostname should contain 0-9a-zA-Z_.- characters only"; + return 0; + } + if(($template=="true") && ($host_templateid!=0)) { $ERROR_MSG="Choose either 'Add zabbix_agent parameters' or 'Use host as template' option"; @@ -2344,6 +2350,12 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid"; return 0; } + if (!eregi('^([0-9a-zA-Z\_\.-]+)$', $host, &$arr)) + { + $ERROR_MSG="Hostname should contain 0-9a-zA-Z_.- characters only"; + return 0; + } + if($useip=="on") { $useip=1; |