Bug 261131 - security/clamassassin: fix non-compliant email header
Summary: security/clamassassin: fix non-compliant email header
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Fernando Apesteguía
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-11 21:55 UTC by martin
Modified: 2022-01-18 12:46 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (chalpin)


Attachments
Patch to clamassassin (322 bytes, patch)
2022-01-11 21:55 UTC, martin
no flags Details | Diff
Patch against the clamassassin port (298 bytes, patch)
2022-01-12 11:45 UTC, martin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description martin 2022-01-11 21:55:33 UTC
Created attachment 230933 [details]
Patch to clamassassin

The X-Virus-Checker-Version: header added by clamassassin contains a newline if clamd is down.  This creates a non-compliant email header (because it doesn't end with a colon).

The problem is that

CLAMVERS=`${CLAMSCAN} -V --stdout`

contains a newline due to clamdscan printing an extra line containing an error message.

The attached patch fixes it, as suggested in:

https://lists.jameslick.com/pipermail/clamassassin-discuss/2015-June/000055.html
Comment 1 Fernando Apesteguía freebsd_committer freebsd_triage 2022-01-12 07:24:26 UTC
Hi Martin,

Thanks for the patch. Would you make the patch against the security/clamassassin port instead of the executable itself?
Comment 2 martin 2022-01-12 11:45:55 UTC
Created attachment 230948 [details]
Patch against the clamassassin port

OK, here is the patch against the port.
Comment 3 commit-hook freebsd_committer freebsd_triage 2022-01-18 06:50:23 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=02ad51df301f8d70e32382580d4018ab0ba730e3

commit 02ad51df301f8d70e32382580d4018ab0ba730e3
Author:     Fernando Apesteguía <fernape@FreeBSD.org>
AuthorDate: 2022-01-17 08:39:58 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2022-01-18 06:48:34 +0000

    security/clamassassin: fix non-compliant email header

    The X-Virus-Checker-Version: header added by clamassassin contains a newline if
    clamd is down.  This creates a non-compliant email header (because it doesn't
    end with a colon).

    PR:     261131
    Reported by:    martin@lispworks.com
    Approved by:    chalpin@cs.wisc.edu (maintainer, timeout > 1 week)

 security/clamassassin/files/patch-clamassassin.in (new) | 11 +++++++++++
 1 file changed, 11 insertions(+)
Comment 4 Fernando Apesteguía freebsd_committer freebsd_triage 2022-01-18 06:50:58 UTC
Committed,

Thanks!
Comment 5 Corey Halpin 2022-01-18 12:36:08 UTC
(Per https://www.freebsd.org/portmgr/policies_contributors/ , isn't maintainer timeout supposed to be two weeks? This patch looks fine to me and I have no objection to it, but I was planning to review it and test it to be sure.)
Comment 6 Fernando Apesteguía freebsd_committer freebsd_triage 2022-01-18 12:46:09 UTC
(In reply to Corey Halpin from comment #5)
Hi Corey,

Sorry for the inconvenience. Yes, the official policy would be 2 weeks although it is not a hard limit (depending on the nature of the change, it could be less, like with some recent log4j vulnerable ports).

Nevertheless I could have waited one more week. The fix was probably not causing a big trouble anyway. Apologies.