Index: branches/2016Q1/net-mgmt/cacti/Makefile =================================================================== --- branches/2016Q1/net-mgmt/cacti/Makefile (revision 405325) +++ branches/2016Q1/net-mgmt/cacti/Makefile (revision 405326) @@ -1,73 +1,73 @@ # $FreeBSD$ PORTNAME= cacti PORTVERSION= 0.8.8f${PATCHLEVEL} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net-mgmt www MASTER_SITES= http://www.cacti.net/downloads/ \ ftp://ftpmirror.uk/freebsd-ports/cacti/ MAINTAINER= freebsd-ports@dan.me.uk COMMENT= Web-driven graphing interface for RRDTool LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE RUN_DEPENDS= rrdtool:${PORTSDIR}/databases/rrdtool USES= cpe shebangfix USE_MYSQL= yes USE_PHP= mysql pcre session sockets snmp xml WANT_PHP_WEB= yes NO_ARCH= yes NO_BUILD= yes PKGMESSAGE= ${WRKDIR}/pkg-message SUB_FILES= pkg-message SHEBANG_FILES= scripts/3com_cable_modem.pl \ scripts/diskfree.pl \ scripts/linux_memory.pl \ scripts/loadavg.pl \ scripts/loadavg_multi.pl \ scripts/ping.pl \ scripts/query_unix_partitions.pl \ scripts/unix_processes.pl \ scripts/unix_tcp_connections.pl \ scripts/unix_users.pl \ scripts/weatherbug.pl \ scripts/webhits.pl CACTIDIR?= share/cacti CACTIUSER?= cacti CACTIGROUP?= cacti USERS?= ${CACTIUSER} GROUPS?= ${CACTIGROUP} WRKSRC= ${WRKDIR}/${PORTNAME}-${SITEDISTVERSION} SITEDISTVERSION= ${PORTVERSION:S/${PATCHLEVEL}$//} PLIST_SUB+= CACTIDIR=${CACTIDIR} CACTIUSER=${CACTIUSER} \ CACTIGROUP=${CACTIGROUP} SUB_LIST+= CACTIDIR=${CACTIDIR} CACTIUSER=${CACTIUSER} \ CACTIGROUP=${CACTIGROUP} post-patch: @${FIND} ${WRKSRC} -name \*.orig -delete; \ ${MV} ${WRKSRC}/include/config.php ${WRKSRC}/include/config.php.sample ${RM} -r ${WRKSRC}/log ${WRKSRC}/rra do-install: ${MKDIR} ${STAGEDIR}/${PREFIX}/${CACTIDIR} ${MKDIR} ${STAGEDIR}/var/log/cacti ${MKDIR} ${STAGEDIR}/var/db/cacti/rra ${MKDIR} ${STAGEDIR}/var/db/cacti/scripts ${CP} -R ${WRKSRC}/* ${STAGEDIR}/${PREFIX}/${CACTIDIR} if [ -f ${PREFIX}/${CACTIDIR}/include/db-settings.php ]; then \ ${ECHO_CMD} "======================================================================="; \ ${ECHO_CMD} "WARNING! You have to move DB settings from"; \ ${ECHO_CMD} "${PREFIX}/${CACTIDIR}/include/db-settings.php file to"; \ ${ECHO_CMD} "${PREFIX}/${CACTIDIR}/include/config.php and remove db-settings.php"; \ fi .include Index: branches/2016Q1/net-mgmt/cacti/files/patch-CVE-2015-8369 =================================================================== --- branches/2016Q1/net-mgmt/cacti/files/patch-CVE-2015-8369 (nonexistent) +++ branches/2016Q1/net-mgmt/cacti/files/patch-CVE-2015-8369 (revision 405326) @@ -0,0 +1,218 @@ +------------------------------------------------------------------------ +r7767 | cigamit | 2015-11-28 20:08:16 +0000 (Sat, 28 Nov 2015) | 1 line +Changed paths: + M /cacti/tags/0.8.8g/docs/CHANGELOG + M /cacti/tags/0.8.8g/graph.php + M /cacti/tags/0.8.8g/include/top_graph_header.php +------------------------------------------------------------------------ + +-bug:0002646: SQL injection in graph.php + +--- graph.php (revision 7766) ++++ graph.php (revision 7767) +@@ -32,29 +32,29 @@ + + api_plugin_hook_function('graph'); + +-include_once("./lib/html_tree.php"); +-include_once("./include/top_graph_header.php"); +- + /* ================= input validation ================= */ +-input_validate_input_regex(get_request_var("rra_id"), "^([0-9]+|all)$"); +-input_validate_input_number(get_request_var("local_graph_id")); +-input_validate_input_number(get_request_var("graph_end")); +-input_validate_input_number(get_request_var("graph_start")); ++input_validate_input_regex(get_request_var_request("rra_id"), "^([0-9]+|all)$"); ++input_validate_input_number(get_request_var_request("local_graph_id")); ++input_validate_input_number(get_request_var_request("graph_end")); ++input_validate_input_number(get_request_var_request("graph_start")); + input_validate_input_regex(get_request_var_request("view_type"), "^([a-zA-Z0-9]+)$"); + /* ==================================================== */ + +-if (!isset($_GET['rra_id'])) { +- $_GET['rra_id'] = 'all'; ++include_once("./lib/html_tree.php"); ++include_once("./include/top_graph_header.php"); ++ ++if (!isset($_REQUEST['rra_id'])) { ++ $_REQUEST['rra_id'] = 'all'; + } + +-if ($_GET["rra_id"] == "all") { ++if ($_REQUEST["rra_id"] == "all") { + $sql_where = " where id is not null"; + }else{ +- $sql_where = " where id=" . $_GET["rra_id"]; ++ $sql_where = " where id=" . $_REQUEST["rra_id"]; + } + + /* make sure the graph requested exists (sanity) */ +-if (!(db_fetch_cell("select local_graph_id from graph_templates_graph where local_graph_id=" . $_GET["local_graph_id"]))) { ++if (!(db_fetch_cell("select local_graph_id from graph_templates_graph where local_graph_id=" . $_REQUEST["local_graph_id"]))) { + print "GRAPH DOES NOT EXIST"; exit; + } + +@@ -61,7 +61,7 @@ + /* take graph permissions into account here, if the user does not have permission + give an "access denied" message */ + if (read_config_option("auth_method") != 0) { +- $access_denied = !(is_graph_allowed($_GET["local_graph_id"])); ++ $access_denied = !(is_graph_allowed($_REQUEST["local_graph_id"])); + + if ($access_denied == true) { + print "ACCESS DENIED"; exit; +@@ -68,7 +68,7 @@ + } + } + +-$graph_title = get_graph_title($_GET["local_graph_id"]); ++$graph_title = get_graph_title($_REQUEST["local_graph_id"]); + + if ($_REQUEST["view_type"] == "tree") { + print ""; +@@ -76,15 +76,15 @@ + print "
"; + } + +-$rras = get_associated_rras($_GET["local_graph_id"]); ++$rras = get_associated_rras($_REQUEST["local_graph_id"]); + + switch ($_REQUEST["action"]) { + case 'view': + api_plugin_hook_function('page_buttons', +- array('lgid' => $_GET["local_graph_id"], ++ array('lgid' => $_REQUEST["local_graph_id"], + 'leafid' => '',//$leaf_id, + 'mode' => 'mrtg', +- 'rraid' => $_GET["rra_id"]) ++ 'rraid' => $_REQUEST["rra_id"]) + ); + ?> + +@@ -105,13 +105,13 @@ +
+ + + + +@@ -143,7 +143,7 @@ + } + + /* fetch information for the current RRA */ +- $rra = db_fetch_row("select id,timespan,steps,name from rra where id=" . $_GET["rra_id"]); ++ $rra = db_fetch_row("select id,timespan,steps,name from rra where id=" . $_REQUEST["rra_id"]); + + /* define the time span, which decides which rra to use */ + $timespan = -($rra["timespan"]); +@@ -154,7 +154,7 @@ + FROM (data_template_data,data_template_rrd,graph_templates_item) + WHERE graph_templates_item.task_item_id=data_template_rrd.id + AND data_template_rrd.local_data_id=data_template_data.local_data_id +- AND graph_templates_item.local_graph_id=" . $_GET["local_graph_id"] . ++ AND graph_templates_item.local_graph_id=" . $_REQUEST["local_graph_id"] . + " LIMIT 0,1"); + $ds_step = empty($ds_step) ? 300 : $ds_step; + $seconds_between_graph_updates = ($ds_step * $rra["steps"]); +@@ -161,17 +161,17 @@ + + $now = time(); + +- if (isset($_GET["graph_end"]) && ($_GET["graph_end"] <= $now - $seconds_between_graph_updates)) { +- $graph_end = $_GET["graph_end"]; ++ if (isset($_REQUEST["graph_end"]) && ($_REQUEST["graph_end"] <= $now - $seconds_between_graph_updates)) { ++ $graph_end = $_REQUEST["graph_end"]; + }else{ + $graph_end = $now - $seconds_between_graph_updates; + } + +- if (isset($_GET["graph_start"])) { +- if (($graph_end - $_GET["graph_start"])>$max_timespan) { ++ if (isset($_REQUEST["graph_start"])) { ++ if (($graph_end - $_REQUEST["graph_start"])>$max_timespan) { + $graph_start = $now - $max_timespan; + }else { +- $graph_start = $_GET["graph_start"]; ++ $graph_start = $_REQUEST["graph_start"]; + } + }else{ + $graph_start = $now + $timespan; +@@ -186,7 +186,7 @@ + graph_templates_graph.height, + graph_templates_graph.width + from graph_templates_graph +- where graph_templates_graph.local_graph_id=" . $_GET["local_graph_id"]); ++ where graph_templates_graph.local_graph_id=" . $_REQUEST["local_graph_id"]); + + $graph_height = $graph["height"]; + $graph_width = $graph["width"]; +@@ -214,12 +214,12 @@ +
+- <?php print htmlspecialchars($graph_title, ENT_QUOTES);?> ++ <?php print htmlspecialchars($graph_title, ENT_QUOTES);?> + +- Zoom Graph
+- CSV Export
+- Graph Source/Properties +- 'view', 'local_graph_id' => $_GET['local_graph_id'], 'rra' => $rra['id'], 'view_type' => $_REQUEST['view_type'])); ?> ++ Zoom Graph
++ CSV Export
++ Graph Source/Properties ++ 'view', 'local_graph_id' => $_REQUEST['local_graph_id'], 'rra' => $rra['id'], 'view_type' => $_REQUEST['view_type'])); ?> + images/graph_page_top.gif' border='0' alt='Page Top' title='Page Top' style='padding: 3px;'>
+
+ + + + + +@@ -249,17 +249,17 @@ +
+- <?php print htmlspecialchars($graph_title, ENT_QUOTES);?> ++ <?php print htmlspecialchars($graph_title, ENT_QUOTES);?> + +- Graph Source/Properties +- CSV Export
+- 'zoom', 'local_graph_id' => $_GET['local_graph_id'], 'rra' => $_GET['rra_id'], 'view_type' => $_REQUEST['view_type'])); ?> ++ Graph Source/Properties ++ CSV Export
++ 'zoom', 'local_graph_id' => $_REQUEST['local_graph_id'], 'rra' => $_REQUEST['rra_id'], 'view_type' => $_REQUEST['view_type'])); ?> +
+ + + + + + + +
+- <?php print htmlspecialchars($graph_title);?> ++ <?php print htmlspecialchars($graph_title);?> + +- Zoom Graph
+- CSV Export
+- 'properties', 'local_graph_id' => $_GET['local_graph_id'], 'rra' => $_GET['rra_id'], 'view_type' => $_REQUEST['view_type'])); ?> ++ Zoom Graph
++ CSV Export
++ 'properties', 'local_graph_id' => $_REQUEST['local_graph_id'], 'rra' => $_REQUEST['rra_id'], 'view_type' => $_REQUEST['view_type'])); ?> +
+- ++ +
+--- include/top_graph_header.php (revision 7766) ++++ include/top_graph_header.php (revision 7767) +@@ -146,12 +146,12 @@ + $graph_data_array["print_source"] = true; + + /* override: graph start time (unix time) */ +- if (!empty($_GET["graph_start"])) { ++ if (!empty($_REQUEST["graph_start"])) { + $graph_data_array["graph_start"] = get_request_var_request("graph_start"); + } + + /* override: graph end time (unix time) */ +- if (!empty($_GET["graph_end"])) { ++ if (!empty($_REQUEST["graph_end"])) { + $graph_data_array["graph_end"] = get_request_var_request("graph_end"); + } + + Property changes on: branches/2016Q1/net-mgmt/cacti/files/patch-CVE-2015-8369 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2016Q1 =================================================================== --- branches/2016Q1 (revision 405325) +++ branches/2016Q1 (revision 405326) Property changes on: branches/2016Q1 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r405325