Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103766 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 59782 invoked from network); 18 Jan 2019 15:15:34 -0000 Received: from unknown (HELO mail-io1-f43.google.com) (209.85.166.43) by pb1.pair.com with SMTP; 18 Jan 2019 15:15:34 -0000 Received: by mail-io1-f43.google.com with SMTP id v10so10423261ios.13 for ; Fri, 18 Jan 2019 03:52:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0RY14yTrnwJ9/ZT8c8qFb4XMvztL8GZdOueYtS3L+6g=; b=FELDVhaHu3UnSl/iVjkrdYfkL2oLEWKeQn5UN1r3apqhz7j7WdezuxShPznb0uHUbz lwC3FkSJ82I+3Iky0YOiR8fkseuLi4NUbp+3IeDDNKUVIHDjGYhCFmSXeIAc3TJlNkXM AGN3wk0n3BETfOFGnlk1pLAPmeGUkmY26et836VBXXCbEAqoLmp/sDJJIlKZYDCiQhGp Wx/5JhpCM83FjYRfP4lLtXQkN5seuqbxfhtzndE23aEmEYkExlnQlrErZK5yyqby/KuY 95uOh9KOCDJWzOXQ6oY7tSfc6nAoYxJafp7rlkr+nncFa3XxaNUtgDLrJgteszEEJtXe c4lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0RY14yTrnwJ9/ZT8c8qFb4XMvztL8GZdOueYtS3L+6g=; b=iKegJOeo6c30tRmiOELIZ/GZ7HWx4AF6sDliKuuESdny0cypLRDUKKWtSS/paNEH2p zGNltdfJts7xbuhjdHwNSkUQvSI+YPyxgBJDLATeA3DFGKQpUp4VAFVw3UV7adD92bDT sglZ37UL5z4Q/Ob9CpdP+onWMjuTfVFx8wLI/O3hnVIMWeI5BJ26N36/qSiatgMXOE+P FQRvsFKulQMMKFjTCbFA/kx497Aq/XAlN/2Uf6WvCsQpv8EAcMNjLQ5dd3+SR4rlJBO+ osME0BH7z6ZRSHEu4WImMmRxgBZs37NA5f7s1IKso77Epi3aEpxL+bTT01oWuRvjwL8i YwEg== X-Gm-Message-State: AJcUukdBf0YBKTvNlZxVP0E+EVQO1OA0zTs3tA8bRKAudCUs1DVpuK5G e12l/GDqV/2ezdE03fNH0FNUTGV3z5ErodwV32o= X-Google-Smtp-Source: ALg8bN7cv8C+Y0Txs/oiDyYshEG6gG1IwVVWX7Q1JTOpYoGHGU/yDNHhUVhqYeh349WjkWvivBh/mpS+loDtQNnueZM= X-Received: by 2002:a5e:aa06:: with SMTP id s6mr10315622ioe.187.1547812331015; Fri, 18 Jan 2019 03:52:11 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 18 Jan 2019 12:51:55 +0100 Message-ID: To: =?UTF-8?Q?Lauri_Kentt=C3=A4?= Cc: Rasmus Schultz , PHP internals , Nikita Popov Content-Type: multipart/alternative; boundary="0000000000002b5354057fba24e0" Subject: Re: [PHP-DEV] Possible bug in the implementation of php://input streams? From: nikita.ppv@gmail.com (Nikita Popov) --0000000000002b5354057fba24e0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jan 16, 2019 at 9:16 PM Lauri Kentt=C3=A4 = wrote: > On 2019-01-16 09:59, Rasmus Schultz wrote: > > We've noticed something odd about the "php://input" stream. > > > > If you attempt to rewind() it after reading the stream, rewind() > > returns > > true, and ftell() subequently returns 0. > > > > However, attempting to read the stream again after that returns > > nothing. > > It has so many layers of redirection that someone missed setting > stream->position on one layer. > > Maybe someone would care to apply the attached patch to fix this. > Thanks Lauri, I have applied your patch to PHP 7.2 and up. Nikita --0000000000002b5354057fba24e0--