Bug#849531: [Logwatch-devel] Bug#849531: Possible security problem, new logwatch sends mails with charset UTF-8

2017-01-15 Thread Willi Mann
Hi Klaus, Am 2017-01-15 um 17:43 schrieb Klaus Ethgen: > Hi Willi, > > Am Sa den 14. Jan 2017 um 16:43 schrieb Willi Mann: >> in order to come closer to a fix for this issue, I propose the following >> two patches: > > >> 0001-Add-outputencoding-parameter.patch > >> This patch allows to config

Bug#849531: [Logwatch-devel] Bug#849531: Possible security problem, new logwatch sends mails with charset UTF-8

2017-01-15 Thread Klaus Ethgen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Hi Willi, Am Sa den 14. Jan 2017 um 16:43 schrieb Willi Mann: > in order to come closer to a fix for this issue, I propose the following > two patches: > > > 0001-Add-outputencoding-parameter.patch > > This patch allows to configure the value for

Bug#849531: [Logwatch-devel] Bug#849531: Possible security problem, new logwatch sends mails with charset UTF-8

2017-01-14 Thread Willi Mann
Hi, in order to come closer to a fix for this issue, I propose the following two patches: 0001-Add-outputencoding-parameter.patch This patch allows to configure the value for the charset in the Content-Type line in mail output. This should address Klaus Ethgen's original concern. Since most peo

Bug#849531: [Logwatch-devel] Bug#849531: Possible security problem,new logwatch sends mails with charset UTF-8

2017-01-01 Thread Jason Pyeron
h-devel] Bug#849531: > Possible security problem,new logwatch sends mails with charset UTF-8 > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > Am So den 1. Jan 2017 um 20:24 schrieb Jason Pyeron: > > Yes, 8-bit ASCII, here is a translation table. > > AS

Bug#849531: [Logwatch-devel] Bug#849531: Possible security problem, new logwatch sends mails with charset UTF-8

2017-01-01 Thread Mike Tremaine
> > The fail-safe default before was ISO-8859-1. So I suggest to use it > again. > If stream converted output it s require please consider making it a configurable module in the code base that can be turned on and off and modified (the module) as needed. Leave the default as is, that way DES

Bug#849531: [Logwatch-devel] Bug#849531: Possible security problem,new logwatch sends mails with charset UTF-8

2017-01-01 Thread 'Klaus Ethgen'
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Am So den 1. Jan 2017 um 20:24 schrieb Jason Pyeron: > Yes, 8-bit ASCII, here is a translation table. ASCII is 7 bit. All 8 bit are different encodings. > > Below 128 it is not a problem as UTF-8 is transparent in this > > range. But > > above 1

Bug#849531: [Logwatch-devel] Bug#849531: Possible security problem,new logwatch sends mails with charset UTF-8

2017-01-01 Thread Jason Pyeron
h-devel] Bug#849531: > Possible security problem,new logwatch sends mails with charset UTF-8 > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > Am So den 1. Jan 2017 um 17:38 schrieb Jason Pyeron: > > > What do you want to say with that? Your input is not in UT

Bug#849531: [Logwatch-devel] Bug#849531: Possible security problem,new logwatch sends mails with charset UTF-8

2017-01-01 Thread 'Klaus Ethgen'
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Am So den 1. Jan 2017 um 17:38 schrieb Jason Pyeron: > > What do you want to say with that? Your input is not in UTF-8. > > That is the point. The OP complaines about ASCII being sent when labeld as > UTF8, as such it created invalid UTF8 sequence

Bug#849531: [Logwatch-devel] Bug#849531: Possible security problem,new logwatch sends mails with charset UTF-8

2017-01-01 Thread Jason Pyeron
849531: > Possible security problem,new logwatch sends mails with charset UTF-8 > > Hi, > > Am 2017-01-01 um 00:20 schrieb Jason Pyeron: > > Not exactly a valid test, besides it works for me. The > issue is internal ascii data being written as ascii but > instructing

Bug#849531: [Logwatch-devel] Bug#849531: Possible security problem,new logwatch sends mails with charset UTF-8

2017-01-01 Thread Willi Mann
Hi, Am 2017-01-01 um 00:20 schrieb Jason Pyeron: > Not exactly a valid test, besides it works for me. The issue is internal > ascii data being written as ascii but instructing consumers > it is uft8. > > $ cat utf8_test.pl > #!/usr/bin/perl > # > use strict; > use File::Slurp; > > my $inputfil

Bug#849531: [Logwatch-devel] Bug#849531: Possible security problem,new logwatch sends mails with charset UTF-8

2016-12-31 Thread Jason Pyeron
> -Original Message- > From: Klaus Ethgen > Sent: Saturday, December 31, 2016 08:48 > To: Willi Mann > Cc: Jason Pyeron; 849...@bugs.debian.org; logwatch-de...@lists.sourceforge.net > > Hi, > > Am Sa den 31. Dez 2016 um 14:28 schrieb Willi Mann: > > thanks for your test cases. However, I

Bug#849531: [Logwatch-devel] Bug#849531: Possible security problem,new logwatch sends mails with charset UTF-8

2016-12-31 Thread 'Klaus Ethgen'
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Hi, Am Sa den 31. Dez 2016 um 14:28 schrieb Willi Mann: > thanks for your test cases. However, I don't think that binmode provides > an acceptable solution, at least not alone. While it ensures that the > strings are valid utf-8 strings, it will con

Bug#849531: [Logwatch-devel] Bug#849531: Possible security problem,new logwatch sends mails with charset UTF-8

2016-12-31 Thread Willi Mann
Hi Jason, thanks for your test cases. However, I don't think that binmode provides an acceptable solution, at least not alone. While it ensures that the strings are valid utf-8 strings, it will convert any valid utf-8 character to two "garbage" characters. Try $ ./utf8_test.pl testlog (see attac

Bug#849531: [Logwatch-devel] Bug#849531: Possible security problem, new logwatch sends mails with charset UTF-8

2016-12-30 Thread 'Klaus Ethgen'
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Am Fr den 30. Dez 2016 um 22:53 schrieb Jason Pyeron: > You would have the same issue with cat /var/log/x True. That is the reason I always tell the people not to use cat for that. (There is only little you should use cat for ever.) I seen many

Bug#849531: [Logwatch-devel] Bug#849531: Possible security problem, new logwatch sends mails with charset UTF-8

2016-12-30 Thread Jason Pyeron
> -Original Message- > From: Willi Mann > Sent: Friday, December 30, 2016 16:21 > To: Klaus Ethgen; 849...@bugs.debian.org > Cc: logwatch-de...@lists.sourceforge.net > Subject: Re: [Logwatch-devel] Bug#849531: Possible security > problem, new logwatch sends mails with charset UTF-8 > > Hi

Bug#849531: [Logwatch-devel] Bug#849531: Possible security problem,new logwatch sends mails with charset UTF-8

2016-12-30 Thread Jason Pyeron
A very rudimentary test: /projects/logwatch $ perl -e 'for ($i=0; $i<256; ++$i) {print chr($i);}' | hexdump.exe -C 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f || 0010 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f || 0020 20 21 22 23 24

Bug#849531: [Logwatch-devel] Bug#849531: Possible security problem,new logwatch sends mails with charset UTF-8

2016-12-30 Thread Jason Pyeron
I have opened https://sourceforge.net/p/logwatch/bugs/56/ . I am working a test case for this right now. As I see it, there are 3 paths to test. Output as STDOUT, file, and email. In each case does an 8bit value (0x00..0xff unsigned) result in a valid UTF-8 character. Is binmode(STDOUT, ":utf8

Bug#849531: [Logwatch-devel] Bug#849531: Possible security problem, new logwatch sends mails with charset UTF-8

2016-12-30 Thread Jason Pyeron
> -Original Message- > From: Willi Mann [mailto:wi...@debian.org] > Sent: Friday, December 30, 2016 12:18 > To: logwatch-de...@lists.sourceforge.net > Cc: 849...@bugs.debian.org; 849531-forwar...@bugs.debian.org; > Klaus Ethgen > Subject: Re: [Logwatch-devel] Bug#849531: Possible security