RE: [PHP-CVS] com php-src: Fix #70013: Reference to $_SESSION is lost after a call to session_regenerate_id(): ext/session/session.c
ext/session/tests/bug67694.phpt ext/session/tests/bug70013.phpt
| From: | Anatol Belski | Date: | Wed, 16 Sep 2015 12:58:42 +0000 |
| Subject: | RE: [PHP-CVS] com php-src: Fix #70013: Reference to $_SESSION is lost after a call to session_regenerate_id(): ext/session/session.c ext/session/tests/bug67694.phpt ext/session/tests/bug70013.phpt |
||
| References: | 1 2 3 4 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-89046@lists.php.net to get a copy of this message | ||
Hi Yasuo,
> -----Original Message-----
> From: yohgaki@gmail.com [mailto:yohgaki@gmail.com] On Behalf Of Yasuo
> Ohgaki
> Sent: Wednesday, September 16, 2015 2:34 PM
> To: Remi Collet <remi@fedoraproject.org>
> Cc: php-cvs@lists.php.net
> Subject: Re: [PHP-CVS] com php-src: Fix #70013: Reference to $_SESSION is lost
> after a call to session_regenerate_id(): ext/session/session.c
> ext/session/tests/bug67694.phpt ext/session/tests/bug70013.phpt
>
> Hi Remi,
>
> On Wed, Sep 16, 2015 at 8:25 PM, Remi Collet <remi@fedoraproject.org>
> wrote:
> > Le 16/09/2015 13:06, Remi Collet a écrit :
> >> Le 06/09/2015 20:57, Yasuo Ohgaki a écrit :
> >>> Commit: f34b858ed018d4c33bc0c3f03acc0bf143d35534 Author: Yasuo
> >>> Ohgaki <yohgaki@php.net> Sun, 6 Sep 2015 17:14:34 +0900
> >>> Parents: 22e23e7cb8ca9aa134d138b5fed031af6c842b44 Branches:
> >>> master
> >>
> >>> Link:
> >>>
> >>> http://git.php.net/?p=php-src.git;a=commitdiff;h=f34b858ed018d4c33bc
> >>> 0
> > c
> >>
> >>>
> > 3f03acc0bf143d35534
> >>
> >> I
> >>
> >> think session management is broken (regression between RC2 and
> >> RC2)
> >>
> >> I an app call "regenerate_session_id()" and the fill the $_SESSION On
> >> the next page, the $_SESSION is empty.
> >>
> >> This seems critical
> >>
> >>
> >> Remi.
> >>
> >>
> >
> >
> > Reproducer:
> >
> > <pre>
> > <?php
> > session_start();
> > echo "Received:\n";
> > print_r($_SESSION);
> > session_unset();
> > session_regenerate_id();
> > //session_start();
> > $_SESSION['valid_id'] = session_id();
> > echo "Saved:\n";
> > print_r($_SESSION);
> >
> >
> > With PHP 5.x / 7.0.0RC2,
> > on second call "received" == "saved" content from previous call
> >
> > With 7.0.0RC3, "received" is empty.
>
> Thank you. Verified.
> It seems php_session_reset_id() does not send cookie or does something wrong.
> I'll fix it.
>
Thanks for the checks. A fix is already in place http://git.php.net/?p=php-src.git;a=commitdiff;h=286b157a5fe8ac40051105ec7caa06cbf626c1dc
. The cookie absence was the cause.
Regards
Anatol