Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75235 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60353 invoked from network); 3 Jul 2014 17:38:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Jul 2014 17:38:06 -0000 Authentication-Results: pb1.pair.com header.from=adam@adamharvey.name; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=adam@adamharvey.name; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain adamharvey.name designates 209.85.223.178 as permitted sender) X-PHP-List-Original-Sender: adam@adamharvey.name X-Host-Fingerprint: 209.85.223.178 mail-ie0-f178.google.com Received: from [209.85.223.178] ([209.85.223.178:37414] helo=mail-ie0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A9/51-49322-CF495B35 for ; Thu, 03 Jul 2014 13:38:04 -0400 Received: by mail-ie0-f178.google.com with SMTP id rl12so544401iec.23 for ; Thu, 03 Jul 2014 10:38:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adamharvey.name; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=N3rx59AJfl5a8lTE92H4Nt5ArFlmjYIA1F6AFKjlqRA=; b=JW3bDvxyTNGg1t0YF8EScLhXjua/QYAOo4K3uI5l+yvdycAM+1JUPi9ZU3MKuSGgTi c6BhXcxJIDkeHYHuMWg6S/xLgLuKQL+cmVqVOwFwx302jokakPAlNXg5vrN7wqIYwAq7 kXaQ5hHV3f0gVleOUWW0b95EpekcESJnNcadU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=N3rx59AJfl5a8lTE92H4Nt5ArFlmjYIA1F6AFKjlqRA=; b=HM0Ls5XhECi10buwdVNmgpQGNEY0Jgy9qTNF8tUqjC2ztjEWGJbj7cg1dMM5zf58pF j16IeJfpTUxvEn+xyYSlh0tS/36czqwOAGRA9/C6YU5hXfTTuO6iQuKpJ7pu7nDI+9Uj FR3qzosxvYHBKwW9Fvah181++c8bF229VPBgfkFdgqMgXQtPIb7F1lDFF3ZVYma70jjM Y3uZ8Ps0Wm8xxs9Pwzs2VVako9LQKf8QI5WxMF1wkcmq3oSyDCq4VSGN7YrRE2a/qDiu LaJ85pFOn7NxiNmDelkSClXRDQ17D8RU8QWoT9FrIbFsrwks1ZPTgUrOwq/DgukPoAmP Qs4Q== X-Gm-Message-State: ALoCoQlDigkKgeMMpSd/aqZnCmm/2oeyHgOoKXI5r4w3k4bF4nQBl9znZoK5Y2IuPl4i1CMxzg8U X-Received: by 10.42.12.6 with SMTP id w6mr3714564icw.69.1404409081352; Thu, 03 Jul 2014 10:38:01 -0700 (PDT) MIME-Version: 1.0 Sender: adam@adamharvey.name Received: by 10.42.78.202 with HTTP; Thu, 3 Jul 2014 10:37:41 -0700 (PDT) In-Reply-To: References: <20140703003646.GA12662@openwall.com> <53B4AC6E.5050401@sugarcrm.com> <20140703012402.GA13015@openwall.com> <20140703060837.GB16494@openwall.com> <20140703063713.GA16777@openwall.com> <53B51347.30405@sugarcrm.com> Date: Thu, 3 Jul 2014 10:37:41 -0700 X-Google-Sender-Auth: LThFoH7jVyrBES9HtBtZdz3Vc6o Message-ID: To: Tjerk Meesters Cc: Stas Malyshev , Solar Designer , Ferenc Kovacs , PHP internals , D0znpp Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] multiline HTTP headers support in header() From: aharvey@php.net (Adam Harvey) On 3 July 2014 03:11, Tjerk Meesters wrote: > > On Thu, Jul 3, 2014 at 4:24 PM, Stas Malyshev > wrote: >> >> Hi! >> >> > Or, check for NUL byte first and reject the whole thing if present; th= en >> > continue with `strpbrk()` :) >> >> To check for nul, you need to scan the whole string. If you're already >> doing this, you don't need strpbrk anymore. > > > Right, with that in mind we might as well keep the current loop and just > break at those three "bad" characters :) I've updated https://github.com/LawnGnome/php-src/compare/remove-multiline-= headers?expand=3D1 to do just that. I also added a null byte test to the new header_multiline.phpt test =E2=80=94 I don't see a case in the bug60227 tes= ts that I'm removing that isn't now covered (all the other tests there were related to multiline support, which has now been removed, so there's little point retaining those tests). I'm still thinking master and possibly 5.6 only for this. Does anyone else have any thoughts (particularly Ferenc and/or Julien on the 5.6 front)? Adam