[dev] quoted-printable-encode issue (Was Re: [commits] Horde branch master updated. 96483e0d91a027c338b703995e0b123b31684488)

Michael J Rubinsky mrubinsk at horde.org
Wed Oct 9 14:21:20 UTC 2013


Quoting Michael M Slusarz <slusarz at horde.org>:

> Quoting Michael J Rubinsky <mrubinsk at horde.org>:
>
>> Quoting Michael M Slusarz <slusarz at horde.org>:
>>
>>> Quoting Michael J Rubinsky <mrubinsk at horde.org>:
>>>
>>>
>>>> Ok. Going to report this to the PHP folks, but, Michael, can you  
>>>> take a look at this test case and double check that this makes  
>>>> sense? The following code segfaults:
>>>>
>>>> $data = fopen('php://temp', 'r+');
>>>> fwrite($data, "test\r\ntest\r\n\r");
>>>>
>>>> $stream = fopen("php://temp", 'r+');
>>>> stream_filter_append($stream, 'convert.quoted-printable-encode',  
>>>> STREAM_FILTER_WRITE, array('line-length' => 5, 'line-break-chars'  
>>>> => "\r\n"));
>>>> rewind($data);
>>>> stream_copy_to_stream($data, $stream);
>>>
>>> I can verify.  Yes, it does look like the line-break-chars are  
>>> what is breaking, since removing the bare "\r" fixes things.
>>>
>>> Report the PHP bug ID back here.
>>
>> https://bugs.php.net/bug.php?id=65776
>
> Good news (at least from my selfish point of view) is that my recent  
> changes had nothing to do with this issue.  Looks like this has been  
> broken for 10 (!) years.  Goes to show you either 1) how little  
> anyone uses the PHP filter feature (probably true) or 2) how rare  
> this kind of mixed line-ending is in real data.

Yup. This client had a mailbox of over 1000 messages and it was only  
one single email, with one single extra \r that completely killed  
syncing the account.

Thanks for the update.

-- 
mike

The Horde Project (www.horde.org)
mrubinsk at horde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5849 bytes
Desc: S/MIME Signature
URL: <http://lists.horde.org/archives/dev/attachments/20131009/d9a0055b/attachment.bin>


More information about the dev mailing list