[prev in list] [next in list] [prev in thread] [next in thread]
List: horde-dev
Subject: Re: [dev] quoted-printable-encode issue (Was Re: [commits] Horde branch master updated. 96483e0d91a0
From: Michael J Rubinsky <mrubinsk () horde ! org>
Date: 2013-09-27 18:52:21
Message-ID: 20130927145221.Horde.s7oEsRujPiYzclMgB67AzQ1 () h4 ! theupstairsroom ! com
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
Quoting Michael M Slusarz <slusarz@horde.org>:
> Quoting Michael J Rubinsky <mrubinsk@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
> When I get back from camping this weekend, I can take a look at the
> PHP source myself. I recently submitted patches to fix white-space
> padding in the PHP source, so I am familiar with the code. I don't
> *think* my changes are what causes this issue... because quite
> frankly having a file with that kind of EOLs is rare.
Indeed, which is why it took me so fracking long to track down the failure :)
> FWIW, you can normalize EOLs in your input data using
> Horde_Stream_Filter_Eol (or similar) so you never trigger this
> faulty PHP code.
Thanks for the hint.
--
mike
The Horde Project (www.horde.org)
mrubinsk@horde.org
["smime.p7s" (application/pkcs7-signature)]
--
dev mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: dev-unsubscribe@lists.horde.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic