diff options
-rw-r--r-- | frontends/php/include/config.inc.php | 6 | ||||
-rw-r--r-- | frontends/php/include/defines.inc.php | 1 | ||||
-rw-r--r-- | frontends/php/include/locales/nl_nl.inc.php | 3 | ||||
-rw-r--r-- | frontends/php/include/locales/sp_sp.inc.php | 3 | ||||
-rw-r--r-- | frontends/php/include/locales/sv_se.inc.php | 3 | ||||
-rw-r--r-- | frontends/php/include/nodes.inc.php | 12 | ||||
-rw-r--r-- | frontends/php/include/perm.inc.php | 9 | ||||
-rw-r--r-- | frontends/php/triggers.php | 3 |
8 files changed, 18 insertions, 22 deletions
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php index 5a02cc93..2ed13bff 100644 --- a/frontends/php/include/config.inc.php +++ b/frontends/php/include/config.inc.php @@ -1915,7 +1915,6 @@ else if (document.getElementById) function get_cookie($name, $default_value=null) { global $_COOKIE; - if(isset($_COOKIE[$name])) return $_COOKIE[$name]; // else return $default_value; @@ -1947,10 +1946,7 @@ else if (document.getElementById) */ function zbx_unsetcookie($name) { - global $_COOKIE; - - setcookie($name, null, -1); - $_COOKIE[$name] = null; + zbx_setcookie($name, null, -99999); } /* function: diff --git a/frontends/php/include/defines.inc.php b/frontends/php/include/defines.inc.php index 997f2d01..e709a73a 100644 --- a/frontends/php/include/defines.inc.php +++ b/frontends/php/include/defines.inc.php @@ -383,6 +383,7 @@ define('RARR', '⇒'); define('ZBX_EREG_HOST_FORMAT', '([0-9a-zA-Z\_\.[:space:][.-.]\$]+)'); + define('ZBX_EREG_NODE_FORMAT', '([0-9a-zA-Z\_\.[:space:][.-.]\$]+)'); define('ZBX_EREG_ITEM_KEY_FORMAT', '([]\[\'0-9a-zA-Z!\_\*\&/\.\,\:\(\)\+ [.-.]\$%]+)'); define('ZBX_EREG_SIMPLE_EXPRESSION_FORMAT', diff --git a/frontends/php/include/locales/nl_nl.inc.php b/frontends/php/include/locales/nl_nl.inc.php index b3bb84b4..220c8051 100644 --- a/frontends/php/include/locales/nl_nl.inc.php +++ b/frontends/php/include/locales/nl_nl.inc.php @@ -264,10 +264,7 @@ "S_COMPARE"=> "Vergelijk", // Footer - "S_ZABBIX_VER"=> "ZABBIX 1.1", - "S_COPYRIGHT_BY"=> "Auteursrecht 2001-2006 ", "S_CONNECTED_AS"=> "Verbonden als", - "S_SIA_ZABBIX"=> "SIA Zabbix", // graph.php "S_CONFIGURATION_OF_GRAPH"=> "Configuratie van grafieken", diff --git a/frontends/php/include/locales/sp_sp.inc.php b/frontends/php/include/locales/sp_sp.inc.php index 6068bf2f..74fae66d 100644 --- a/frontends/php/include/locales/sp_sp.inc.php +++ b/frontends/php/include/locales/sp_sp.inc.php @@ -434,10 +434,7 @@ 'S_COMPARE'=> 'Comparar', // Footer - 'S_ZABBIX_VER'=> 'ZABBIX 1.3.5', - 'S_COPYRIGHT_BY'=> 'Copyright 2001-2007 por ', 'S_CONNECTED_AS'=> 'Conectado como', - 'S_SIA_ZABBIX'=> 'SIA Zabbix', // graph.php 'S_CONFIGURATION_OF_GRAPH'=> 'Configuración del gráfico', diff --git a/frontends/php/include/locales/sv_se.inc.php b/frontends/php/include/locales/sv_se.inc.php index ada3af08..0207039a 100644 --- a/frontends/php/include/locales/sv_se.inc.php +++ b/frontends/php/include/locales/sv_se.inc.php @@ -270,10 +270,7 @@ "S_COMPARE"=> "Jämför", // Footer - "S_ZABBIX_VER"=> "ZABBIX 1.1.2", - "S_COPYRIGHT_BY"=> "Copyright 2001-2006 ", "S_CONNECTED_AS"=> "Ansluten som", - "S_SIA_ZABBIX"=> "SIA Zabbix", // graph.php "S_CONFIGURATION_OF_GRAPH"=> "Konfiguration av diagram", 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. diff --git a/frontends/php/include/perm.inc.php b/frontends/php/include/perm.inc.php index 1d7415e9..8df5a68f 100644 --- a/frontends/php/include/perm.inc.php +++ b/frontends/php/include/perm.inc.php @@ -49,7 +49,7 @@ $sessionid = get_cookie("zbx_sessionid"); - if(isset($sessionid)) + if( !is_null($sessionid)) { if(!($USER_DETAILS = DBfetch(DBselect("select u.*,s.* from sessions s,users u". " where s.sessionid=".zbx_dbstr($sessionid)." and s.userid=u.userid". @@ -108,11 +108,8 @@ if(!isset($_REQUEST['message'])) $_REQUEST['message'] = $message; - if($page["file"]!="index.php") - { - Redirect("index.php?message=".addslashes($_REQUEST['message'])); - exit; - } + include('index.php'); + exit; } } diff --git a/frontends/php/triggers.php b/frontends/php/triggers.php index d7db5ac3..f8a5d2aa 100644 --- a/frontends/php/triggers.php +++ b/frontends/php/triggers.php @@ -404,8 +404,7 @@ include_once "include/page_header.php"; if(is_null($row['hostid'])) $row['hostid'] = '0'; - $description = array('['.$row["triggerid"].']', - new CCheckBox( + $description = array( new CCheckBox( "g_triggerid[]", /* name */ NULL, /* checked */ NULL, /* action */ |