diff options
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"); |
