Bug 1123093 - logwatch encode=base64 generates invalid mime block
Summary: logwatch encode=base64 generates invalid mime block
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: logwatch
Version: 7.2
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Jan Synacek
QA Contact: Mirek Zalewski
URL:
Whiteboard:
Depends On:
Blocks: 1465901
TreeView+ depends on / blocked
 
Reported: 2014-07-24 20:32 UTC by Jerry McCarthy
Modified: 2018-04-10 14:44 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 14:43:52 UTC


Attachments (Terms of Use)
naive fix (1.10 KB, patch)
2016-03-16 13:29 UTC, Jan Synacek
no flags Details | Diff
reproducer (20.00 KB, application/x-tar)
2017-10-03 11:25 UTC, Jan Synacek
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0822 None None None 2018-04-10 14:44:04 UTC

Description Jerry McCarthy 2014-07-24 20:32:42 UTC
Description of problem:
logwatch.pl base64 encodes multiple segments and concatenates the encoded parts instead of concatenating the segments and then encoding a single text block.  This creates imbedded "end" equal signs in the mime block which causes decode errors.

Version-Release number of selected component (if applicable):
7.4

How reproducible:
Any time any segment but the last has a length not divisible by three and encode = base64 was specified in the logwatch.conf file.

Steps to Reproduce:
1. specify encode = base64 in logwatch.conf
2. 
3.

Actual results:
invalid mime block in email.

Expected results:
valid mime block in email.

Additional info:

Comment 3 Jan Synacek 2016-03-16 13:25:55 UTC
How can I actually reproduce this? Making some parts not divisible by 3 before encoding them still produces valid output.

Comment 4 Jan Synacek 2016-03-16 13:29:51 UTC
Created attachment 1137033 [details]
naive fix

Comment 5 Jerry McCarthy 2016-03-19 23:58:42 UTC
The naive fix works for me.  Without the fix I get invalid email, with the fix I get valid email.  Not knowing perl it is difficult for me to provide a test case.

Comment 8 Mike McCune 2016-03-28 22:49:28 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions

Comment 12 Jan Synacek 2017-10-03 11:25:15 UTC
Created attachment 1333603 [details]
reproducer

Comment 16 errata-xmlrpc 2018-04-10 14:43:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0822


Note You need to log in before you can comment on or make changes to this bug.