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/hosts.inc.php | |
| parent | b9225beae8d19c32dd4c0e0d818cf8e0114321e3 (diff) | |
- 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/hosts.inc.php')
| -rw-r--r-- | frontends/php/include/hosts.inc.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/frontends/php/include/hosts.inc.php b/frontends/php/include/hosts.inc.php index 64ae8f36..f7d7dd33 100644 --- a/frontends/php/include/hosts.inc.php +++ b/frontends/php/include/hosts.inc.php @@ -147,6 +147,12 @@ require_once "include/items.inc.php"; { global $ZBX_CURNODEID; + if( !eregi('^'.ZBX_EREG_HOST_FORMAT.'$', $host) ) + { + error("Hostname should contain '0-9a-zA-Z_. $'- characters only"); + return false; + } + /* Character '-' must be last in the list of symbols, otherwise it won't be accepted */ if ( !empty($dns) && !eregi('^([0-9a-zA-Z\_\.\$[.-.]]+)$', $dns)) { |
