Subject: [Pkg-cacti-maint] Bug#974926: cacti zoom bug

From: Matus UHLAR - fantomas <[email-masked]>
Date: Mon, 16 Nov 2020 17:01:31 +0100

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, [email-masked] ; 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");
 }

---

From: "Debian Bug Tracking System" <[email-masked]>
Date: Mon, 16 Nov 2020 18:09:03 +0000

Your message dated Mon, 16 Nov 2020 19:05:04 +0100
with message-id <[email-masked]>
and subject line Re: Bug#974926: cacti zoom bug
has caused the Debian Bug report #974926,
regarding cacti zoom bug
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email-masked]
immediately.)

-- 
974926: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=974926
Debian Bug Tracking System
Contact [email-masked] with problems

Subject: cacti zoom bug
From: Matus UHLAR - fantomas <[email-masked]>
To: [email-masked]
Date: Mon, 16 Nov 2020 17:01:31 +0100

Package: cacti

% date -d @1600000000

cacti bug explained:

 

 

Subject: Re: Bug#974926: cacti zoom bug
From: Paul Gevers <[email-masked]>
To: Matus UHLAR - fantomas <[email-masked]>, [email-masked]
Date: Mon, 16 Nov 2020 19:05:04 +0100

Version: 1.2.2+ds1-2+deb10u3

Hi Matus,

> Version: 0.8.8h+ds1-10+deb9u1

This version is no longer supported by Debian, as support for Debian 9
Stretch stopped in July this year. Stretch is supported by LTS, but
that's handled differently, see https://wiki.debian.org/LTS for information.

Paul