[dev] quoted-printable-encode issue (Was Re: [commits] Horde branch master updated. 96483e0d91a027c338b703995e0b123b31684488)
Michael M Slusarz
slusarz at horde.org
Wed Oct 9 02:54:40 UTC 2013
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.
michael
___________________________________
Michael Slusarz [slusarz at horde.org]
More information about the dev
mailing list