ID:               38346
 Updated by:       [EMAIL PROTECTED]
 Reported By:      wf at bitplan dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Session related
 Operating System: all
 PHP Version:      5.1.4
 New Comment:

Thee is good explanation in bug #33786.


Previous Comments:
------------------------------------------------------------------------

[2006-08-05 15:21:07] wf at bitplan dot com

Description:
------------
The bugreport
http://bugs.php.net/bug.php?id=33786
has just the status "bogus". That is a bug, because
session_encode will fail badly and a whole web - app will suffer (I've
seen one report that someone lost his job due to sessions not being
restored properly ...)


Reproduce code:
---------------
<?php
for ($i=33;$i<255;$i++) {
        @session_destroy();
        @session_start();
        $_SESSION["validname"]="valid value";
        $_varname="v".chr($i)."ar";
        $_SESSION[$_varname]=$i;
        $data=session_encode();
        if (strlen($data)==0) 
        echo "when varname is ".$_varname.
                         " session has ".count($_SESSION).
                         " entries that are encoded with ".strlen($data)." 
bytes ".
                         //" as '".$data.
                         "'<br />";
}       // for           
?>

Expected result:
----------------
A (fatal) error message on using | within the array index name for
$_SESSION

Actual result:
--------------
when varname is v|ar session has 2 entries that are encoded with 0
bytes '


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=38346&edit=1

Reply via email to