Package: graphdefang
Version: 2.84-3+b2
Severity: important
Tags: patch newcomer
Dear Maintainer,
*** Reporter, please consider answering these questions, where appropriate ***
* What led up to the situation?
* What exactly did you do (or not do) that was effective (or
ineffective)?
* What was the outcome of this action?
* What outcome did you expect instead?
*** End of the template - remove these template lines ***
I realized that my graphdefang output hasn't worked in ages so I decided to
track down the reason(s)
why.
After checking web server logs I realized it was because PHP 7.x removed ereg()
function and
therefore its usage needed to be replaced with preg_match() so I replaced the
ereg() call with a
preg_match() call, putting / and / around the pattern string. Maybe strpos is
more appropriate
but this was the quick fix.
-- System Information:
Debian Release: bullseye/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.19.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages graphdefang depends on:
ii libfile-readbackwards-perl 1.05-2
ii libgd-graph-perl 1.54~ds-2
ii libgd-text-perl 0.86-9
ii libmldbm-perl 2.05-2
ii libtimedate-perl 2.3000-2
ii perl [libstorable-perl] 5.30.0-9
Versions of packages graphdefang recommends:
ii php 2:7.3+69
ii php7.0 [php] 7.0.31-1
ii php7.2 [php] 7.2.11-3
ii php7.3 [php] 7.3.12-1
Versions of packages graphdefang suggests:
ii mimedefang 2.84-3+b2
-- Configuration Files:
/etc/graphdefang/graphdefang-config changed:
$DATAFILE = '/var/log/mail.log';
$OUTPUT_DIR = '/var/lib/graphdefang';
my %GraphSettings;
%GraphSettings = ();
%GraphSettings = (
'data_types' => ['spam', 'probable_spam', 'virus', 'mail_in'],
'graph_type' => 'line',
'grouping' => 'summary',
'grouping_times'=> ['hourly','daily','monthly'],
);
push @GRAPHS, { %GraphSettings };
%GraphSettings = ();
%GraphSettings = (
'data_types' => ['virus'],
'graph_type' => 'stacked_bar',
'grouping' => 'value1',
'value1_title' => 'VirusName',
'grouping_times'=> ['hourly','daily','monthly'],
#'filter' => '^(?:(?!klez).)*$',
#'filter_name' => 'Not Klez',
);
push @GRAPHS, { %GraphSettings };
%GraphSettings = ();
%GraphSettings = (
'data_types' => ['spam', 'virus'],
'graph_type' => 'stacked_bar',
'grouping' => 'recipient',
'top_n' => '9',
'grouping_times'=> ['hourly','daily','monthly'],
);
push @GRAPHS, { %GraphSettings };
%GraphSettings = ();
%GraphSettings = (
'data_types' => ['spam'],
'graph_type' => 'stacked_bar',
'grouping' => 'value2',
'value2_title' => 'Relay Address',
'top_n' => '9',
'grouping_times'=> ['hourly','daily','monthly'],
'filter' => '^(?:(?!127.0.0.1).)*$',
'filter_name' => 'localhost',
);
push @GRAPHS, { %GraphSettings };
%GraphSettings = ();
%GraphSettings = (
'data_types' => ['virus'],
'graph_type' => 'stacked_bar',
'grouping' => 'value2',
'value2_title' => 'Relay Address',
'top_n' => '9',
'grouping_times'=> ['hourly','daily','monthly'],
'filter' => '^(?:(?!127.0.0.1).)*$',
'filter_name' => 'localhost',
);
push @GRAPHS, { %GraphSettings };
-- no debconf information
*** index.php.dpkg-dist 2019-12-10 13:30:49.517395992 -0600
--- index.php 2019-12-10 11:13:50.179334072 -0600
***************
*** 65,71 ****
foreach($filename_array as $value) {
! if (ereg($view,$value)) {
$subvalue=explode($view,$value);
#print "$subvalue[1]";
print "<a href=\"index.php?view=$subvalue[1]\">";
--- 65,72 ----
foreach($filename_array as $value) {
! $view_pattern = '/' . $view . '/';
! if (preg_match($view_pattern,$value)) {
$subvalue=explode($view,$value);
#print "$subvalue[1]";
print "<a href=\"index.php?view=$subvalue[1]\">";