Friday, November 26, 2010

BAD HEADER, Improper use of control character (char 0D hex)

SkyHi @ Friday, November 26, 2010
I looked at the headers of a message from pligg by chance and saw this in there.

X-Amavis-Alert: BAD HEADER, Improper use of control character (char 0D hex):


So my Amavis virus filtering didn't like the \r\n - which I don't believe is needed. I tested it with just the \n and no problems. It still passes but the more stringent mail systems may bounce it.

diff linkadmin.php.original linkadmin.php


< $headers = 'From: ' . PLIGG_PassEmail_From . "\r\n";


> $headers = 'From: ' . PLIGG_PassEmail_From . "\n";

editlink.php, login.php, recommend.php also have this. In recommend.php on line 91 it looks like it was fixed. It was commented out and has a line below with just the \n and no \r.

I looked at the svn from last night - 407 I think?

I solved the issue by turning almost all \r\n into \n in the php

module called "compose2.php". I hope I will not have to do the same

with the whole code...