summaryrefslogtreecommitdiffstats
path: root/frontends/php/chart.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2002-09-07 09:16:46 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2002-09-07 09:16:46 +0000
commit9db4b0aeb0582ea1afa3e54493268348963cbe0f (patch)
treee43517c29d15694a81179018dcc069aa6ea9b80d /frontends/php/chart.php
parentcf2952549223c779ec2fe14eddd6dc70bcae064c (diff)
downloadzabbix-9db4b0aeb0582ea1afa3e54493268348963cbe0f.tar.gz
zabbix-9db4b0aeb0582ea1afa3e54493268348963cbe0f.tar.xz
zabbix-9db4b0aeb0582ea1afa3e54493268348963cbe0f.zip
- fixed permission check for all *.php (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@483 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/chart.php')
-rw-r--r--frontends/php/chart.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/frontends/php/chart.php b/frontends/php/chart.php
index 538aa894..d19b94dc 100644
--- a/frontends/php/chart.php
+++ b/frontends/php/chart.php
@@ -16,7 +16,7 @@
$period=3600;
}
- if(isset($from))
+ if(isset($HTTP_GET_VARS["from"]))
{
$from=$HTTP_GET_VARS["from"];
}
@@ -38,6 +38,8 @@
Header( "Content-type: image/png");
Header( "Expires: Mon, 17 Aug 1998 12:51:50 GMT");
+ check_authorisation();
+
$im = imagecreate($sizeX+$shiftX+61,$sizeY+2*$shiftY+40);
$red=ImageColorAllocate($im,255,0,0);
@@ -56,6 +58,14 @@
ImageFilledRectangle($im,0,0,$sizeX+$shiftX+61,$sizeY+2*$shiftY+40,$white);
ImageRectangle($im,0,0,$x-1,$y-1,$black);
+ if(!check_right("Item","R",$HTTP_GET_VARS["itemid"]))
+ {
+// show_table_header("<font color=\"AA0000\">No permissions !</font>");
+// show_footer();
+ ImagePng($im);
+ ImageDestroy($im);
+ exit;
+ }
for($i=0;$i<=$sizeY;$i+=$sizeY/5)
{