Bug 4396 - [review] spamcop plugin spamcop_max_report_size not defined
Summary: [review] spamcop plugin spamcop_max_report_size not defined
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Plugins (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: Other other
: P1 critical
Target Milestone: 3.1.0
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords: triage
Depends on:
Blocks:
 
Reported: 2005-06-07 11:22 UTC by Graham Murray
Modified: 2005-07-28 03:17 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status
Output of spamassassin -D -r text/plain None Graham Murray [NoCLA]
local.cf text/plain None Graham Murray [NoCLA]
user_prefs text/plain None Graham Murray [NoCLA]
fix the conf location patch None Kuang-che Wu [NoCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Murray 2005-06-07 11:22:31 UTC
When reporting spam, spamcop plugin reports that an undefined value is used in
multiplication at lines 231 and 232. This must be spamcop_max_report_size which
should be initialised from the configuration file, or default to 50.
Comment 1 Theo Van Dinter 2005-06-07 11:48:59 UTC
Subject: Re:   New: spamcop plugin spamcop_max_report_size not defined

On Tue, Jun 07, 2005 at 11:22:32AM -0700, bugzilla-daemon@bugzilla.spamassassin.org wrote:
> When reporting spam, spamcop plugin reports that an undefined value is used in
> multiplication at lines 231 and 232. This must be spamcop_max_report_size which
> should be initialised from the configuration file, or default to 50.

Well, it could be one of two things:

  if (length($original) > $self->{conf}->{spamcop_max_report_size} * 1024) {
      substr($original, ($self->{conf}->{spamcop_max_report_size} * 1024)) =

spamcop_max_report_size is supposed to have a default of 50, so I don't
think one can actually make it undef.  Which means $original would have
to be undef, which should also not be possible.  ;)

Comment 2 Graham Murray 2005-06-12 03:14:39 UTC
No, I think that it must be spamcop_max_report_size (and I too cannot see how it
can be undefined), as original is not used in the multiplication and a constant
cannot be undefined. I have tried running with spamcop_max_report_size not
defined or defined in one of or both local.cf and ~/.spamassassin/user_prefs,
but it makes no difference. Also, I see this problem on 2 different systems, one
running Gentoo and perl 5.8.6, the other SuSe and perl 5.8.3, both using the
latest SVN. The report is sent to Spamcop, but it shows it as an error as the
report is truncated.

 Below is an extract from spamassassin -D -r

[22172] warn: Use of uninitialized value in multiplication (*) at
/usr/lib/perl5/vendor_perl/5.8.6/Mail/SpamAssassin/Plugin/SpamCop.pm line 231.
[22172] warn: Use of uninitialized value in multiplication (*) at
/usr/lib/perl5/vendor_perl/5.8.6/Mail/SpamAssassin/Plugin/SpamCop.pm line 232.
[22172] dbg: reporter: SpamCop sent FROM graham@gmurray.org.uk
Comment 3 Bob Menschel 2005-07-03 18:25:17 UTC
Triage: Graham, could you create an attachment with the full "spamassassin -D
-r" debug output, and others with your local.cf and user_prefs? Perhaps by
looking at the full data report, someone will be able to see something.
Comment 4 Graham Murray 2005-07-03 22:34:47 UTC
Created attachment 2978 [details]
Output of spamassassin -D -r

The spamassassin -D -r output as requested. I have x'd out my spamcop reporting
address.
Comment 5 Graham Murray 2005-07-03 22:35:45 UTC
Created attachment 2979 [details]
local.cf

local.cf as requested
Comment 6 Graham Murray 2005-07-03 22:37:41 UTC
Created attachment 2980 [details]
user_prefs

user_prefs as requested, again with the spamcop reporting address x'd out
Comment 7 Kuang-che Wu 2005-07-24 03:35:15 UTC
Created attachment 3036 [details]
fix the conf location

see the patch. the conf is at $self->{main}->{conf}->{spamcop_max_report_size},
not $self->{conf}->{spamcop_max_report_size}
Comment 8 Daryl C. W. O'Shea 2005-07-25 12:33:05 UTC
+1
Comment 9 Daryl C. W. O'Shea 2005-07-25 14:42:21 UTC
Sending        lib/Mail/SpamAssassin/Plugin/SpamCop.pm
Transmitting file data .
Committed revision 225189.

Fixed in trunk.  3.0 isn't affected, please review for 3.1.
Comment 10 Daryl C. W. O'Shea 2005-07-27 21:42:15 UTC
Bumping up severity/priority since 3.1.0 really shouldn't be released without
this as SpamCop reporting is broken without it.
Comment 11 Theo Van Dinter 2005-07-28 07:47:35 UTC
(In reply to comment #10)
> Bumping up severity/priority since 3.1.0 really shouldn't be released without
> this as SpamCop reporting is broken without it.

+1
Comment 12 Justin Mason 2005-07-28 09:45:21 UTC
+1  (I wish perl would complain about this stuff)
Comment 13 Daryl C. W. O'Shea 2005-07-28 11:16:59 UTC
Sending        lib/Mail/SpamAssassin/Plugin/SpamCop.pm
Transmitting file data .
Committed revision 225838.
Comment 14 Daryl C. W. O'Shea 2005-07-28 11:17:54 UTC
fixed