diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-05-21 14:37:06 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-05-21 14:37:06 +0000 |
| commit | 22ea3729b7a5db9ae6dc213a2507eedde41264e1 (patch) | |
| tree | dcd6e7064af898782b920c4cad9a02aad88e8089 /frontends/php/include/items.inc.php | |
| parent | b9225beae8d19c32dd4c0e0d818cf8e0114321e3 (diff) | |
| download | zabbix-22ea3729b7a5db9ae6dc213a2507eedde41264e1.tar.gz zabbix-22ea3729b7a5db9ae6dc213a2507eedde41264e1.tar.xz zabbix-22ea3729b7a5db9ae6dc213a2507eedde41264e1.zip | |
- restored validation for hostname (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@4155 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/items.inc.php')
| -rw-r--r-- | frontends/php/include/items.inc.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/frontends/php/include/items.inc.php b/frontends/php/include/items.inc.php index 840a2eec..a78986fc 100644 --- a/frontends/php/include/items.inc.php +++ b/frontends/php/include/items.inc.php @@ -19,6 +19,7 @@ **/ ?> <?php + function item_type2str($type) { switch($type) @@ -147,6 +148,12 @@ if(($i = array_search(0,$applications)) !== FALSE) unset($applications[$i]); + if( !eregi('^'.ZBX_EREG_ITEM_KEY_FORMAT.'$', $key) ) + { + error("Key should contain '[]0-9a-zA-Z!_,:()+.*\ $'- characters only"); + return false; + } + if($delay<1) { error("Delay cannot be less than 1 second"); |
