Package: cacti
Version: 0.8.8h+ds1-10+deb9u1

when trying to zoom a graph, bug in cacti causes it to ignore zoom because
of timestamp too high.

the original cacti ignores timestamp bigger than 1600000000, however we've
been there already:

% date -d @1600000000
Sun Sep 13 14:26:40 CEST 2020

cacti bug explained:

https://github.com/Cacti/cacti/issues/3797

attaching patch for cacti 0.8.8h in stretch


--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
(R)etry, (A)bort, (C)ancer
--- /usr/share/cacti/site/graph_image.php.orig	2013-08-07 04:31:19.000000000 +0200
+++ /usr/share/cacti/site/graph_image.php	2020-09-30 15:58:57.439931128 +0200
@@ -60,12 +60,12 @@
 $graph_data_array = array();
 
 /* override: graph start time (unix time) */
-if (!empty($_GET["graph_start"]) && $_GET["graph_start"] < 1600000000) {
+if (!empty($_GET["graph_start"]) && $_GET["graph_start"] < 2600000000) {
 	$graph_data_array["graph_start"] = $_GET["graph_start"];
 }
 
 /* override: graph end time (unix time) */
-if (!empty($_GET["graph_end"]) && $_GET["graph_end"] < 1600000000) {
+if (!empty($_GET["graph_end"]) && $_GET["graph_end"] < 2600000000) {
 	$graph_data_array["graph_end"] = $_GET["graph_end"];
 }
 
--- /usr/share/cacti/site/graph_xport.php.orig	2018-10-23 09:32:19.407796822 +0200
+++ /usr/share/cacti/site/graph_xport.php	2020-10-23 09:32:55.536128501 +0200
@@ -53,12 +53,12 @@
 /* ==================================================== */
 
 /* override: graph start time (unix time) */
-if (!empty($_GET["graph_start"]) && is_numeric($_GET["graph_start"]) && $_GET["graph_start"] < 1600000000) {
+if (!empty($_GET["graph_start"]) && is_numeric($_GET["graph_start"]) && $_GET["graph_start"] < 2600000000) {
 	$graph_data_array["graph_start"] = get_request_var("graph_start");
 }
 
 /* override: graph end time (unix time) */
-if (!empty($_GET["graph_end"]) && is_numeric($_GET["graph_end"]) && $_GET["graph_end"] < 1600000000) {
+if (!empty($_GET["graph_end"]) && is_numeric($_GET["graph_end"]) && $_GET["graph_end"] < 2600000000) {
 	$graph_data_array["graph_end"] = get_request_var("graph_end");
 }
 

Reply via email to