Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69910 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17029 invoked from network); 28 Oct 2013 11:01:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Oct 2013 11:01:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=tjerk.meesters@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tjerk.meesters@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.175 as permitted sender) X-PHP-List-Original-Sender: tjerk.meesters@gmail.com X-Host-Fingerprint: 209.85.128.175 mail-ve0-f175.google.com Received: from [209.85.128.175] ([209.85.128.175:59168] helo=mail-ve0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 41/63-22054-3244E625 for ; Mon, 28 Oct 2013 06:01:55 -0500 Received: by mail-ve0-f175.google.com with SMTP id jz11so4721300veb.6 for ; Mon, 28 Oct 2013 04:01:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=rtbWdRW0070x+Bdk3YL0wmgP877hBaWYGRezJt7tY24=; b=W2E++Q8gWNaV4FcjqielCKroMv7+LXKYZ8nqPOtfigjNEB6YYBjtLPj89RXeJEuBzJ kShXITMjqBZ3EMnFRbpbY+FottVOHcMuH3mkNU7cxO1L4Nskktd3zp0ItOoiNudGZC2r lkb7ClVsHpAwHiFfGdyWh5vFw5I/lv/OoGKQ/vMiP0cURmOBP1aN6T067IX5UqwKngHp n8gUKuJlmnvvN4WHPjAVfD+rwgWJR9DDA4Ge+YykEfaZdgwOqwloBuMlupEoK6GYqUpw 4PEU2YnkpYfUhh+w8yt5LRE63Fo3csnIY3JaWA7qqVXiNj78OMK/hCBZTJ3+GEIAsZHN SZ4w== MIME-Version: 1.0 X-Received: by 10.58.208.130 with SMTP id me2mr12860715vec.13.1382958112107; Mon, 28 Oct 2013 04:01:52 -0700 (PDT) Received: by 10.58.128.33 with HTTP; Mon, 28 Oct 2013 04:01:52 -0700 (PDT) In-Reply-To: References: <3E.D7.40084.12BBA625@pb1.pair.com> <526B554F.1020606@pthreads.org> <526CAF56.70908@pthreads.org> Date: Mon, 28 Oct 2013 19:01:52 +0800 Message-ID: To: Julien Pauli Cc: Joe Watkins , Yasuo Ohgaki , PHP Internals Content-Type: multipart/alternative; boundary=047d7bdc192c02f37104e9cb0728 Subject: Re: [PHP-DEV] error_log binary unsafe From: tjerk.meesters@gmail.com (Tjerk Meesters) --047d7bdc192c02f37104e9cb0728 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Oct 28, 2013 at 6:50 PM, Julien Pauli wrote: > On Sun, Oct 27, 2013 at 7:14 AM, Joe Watkins > wrote: > > > On 10/26/2013 11:54 PM, Yasuo Ohgaki wrote: > > > >> Hi Joe, > >> > >> On Sun, Oct 27, 2013 at 7:48 AM, Yasuo Ohgaki >> yohgaki@ohgaki.net>> wrote: > >> > >> On Sat, Oct 26, 2013 at 2:38 PM, Joe Watkins > >> > >> **> wrote: > >> > >> Mail is not yet handled, TCP/IP is not supported any more, > >> streams are binary safe. > >> The SAPI and default error logging mechanism are all that > >> require attention. > >> > >> The patch is not final and doesn't include a fix for every > >> implementation of SAPI. > >> > >> I don't see the need for confusion ?? > >> > >> > >> Generally speaking, I'm not against making functions/features > >> binary safe. > >> > >> There are many implementations of syslog/SAPI and not sure if it > >> is good for all. > >> It could cause BC issue also. For example, application like OSSEC > >> HIDS detects > >> possible intrusion by analyzing logs. Patching SAPI may break > >> these applications. > >> > >> I'm not against applying your patch to master, but it's not for > >> released versions. > >> We needs UPGRADE note if the patch is applied. > >> > >> > >> I think it's good for master. > >> Do you have commit karma? > >> If not, I'm willing to merge your patch unless there are not objections. > >> > >> Regards, > >> > >> -- > >> Yasuo Ohgaki > >> yohgaki@ohgaki.net > >> > > > > I don't have karma ... > > > > There are lots of SAPI's, but this patch wasn't meant to implement them > > all, only to provide a route whereby they can implement binary safe > > log_message in the shape of log_message_ex. > > > > The patch implements binsafe log for cli and cgi, do we need to implement > > any more ?? > > > > Joe: Why do you use strlen() ? This leads to the same not binary safe > string, am I wrong ?? > > https://github.com/krakjoe/php-src/commit/be5f38ddd449c20230c042aef9757efb2ee08188#diff-1a9cfc6173e3a434387996e46086da56R610 If I'm reading the patch correctly, that should be resolved by updating all `php_log_err()` references in the rest of the project to use `php_log_err_ex()` instead. I'm not sure if that was deliberately left out, though. > > > Julien Pauli > -- -- Tjerk --047d7bdc192c02f37104e9cb0728--