Re: subject folding insert spaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Jon Angliss wrote:
> Ironically I'd started typing a reply to this yesterday before my 
> computer crashed.  Are you talking about sending, or receiving messages?
> If you're talking about outbound, then the issue is likely to be in 
> class/deliver/Deliver.class.php in the foldLine function.

I located the error, it is there, in the foldLine function. As I don't 
understand every aspect of the code, I better not try to patch it 
myself, but I describe what I found:

The foldLine function splits any line into pieces shorter than a given 
length, and the concatenates them with $fold_string, which is

$fold_string = "\r\n " . $pre;  // line 719

The line where the pieces are concatenated:

$line = implode($fold_string,$aFoldLine);  // line 794

$pre is a parameter, which is four spaces at every invocation of 
foldLine in Deliver.class.php.

However this is wrong, as only "\r\n" should be inserted into the folded 
lines. (Meaning, that if there is no whitespace in a header, then it 
cannot be folded, as a folded line should be started with a whitespace.)

The inserted spaces are not a problem where the header is just 
informative, and not visible for the basic users (Received: headers for 
example), but annoying with Subject: for example, where other clients 
doesn't remove the extra spaces. (As they should not.)

The line numbers are from svn branches/SM-1_4-STABLE r13048.

Hope it helps to fix for someone how knows the code better :)

Best,
Peter

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

[Index of Archives]     [Video For Linux]     [Yosemite News]     [Yosemite Photos]     [gtk]     [KDE]     [Cyrus SASL]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux