[dev] session id contains illegal characters ... ?

Marc G. Fournier scrappy at hub.org
Mon Mar 24 22:56:18 PST 2003


Got it:

        } else {
//            if (isset($GLOBALS['UNIQUE_ID'])) {
                $new_session_id = $GLOBALS['UNIQUE_ID'];
  //          } elseif (function_exists('posix_getpid')) {
//                $new_session_id = md5(microtime() . posix_getpid());
   //         } else {
   //             $new_session_id = md5(uniqid(mt_rand(), true));
     //       }
            session_id($new_session_id);

I've tried using all three ... posix_getpid and mt_rand both work fine,
the UNIQUE_ID one seems to be the one that generates the error ...


On Mon, 24 Mar 2003, Marc G. Fournier wrote:

>
> NOt sure if this helps any, but if I try and use the SQL sessionhandler,
> my session_id's are looking like:
>
> 1_662_maildb=# select session_id from horde_sessionhandler;
>             session_id
> ----------------------------------
>  Pn at yx0B14IUAAKLUCmI
>  Pn at 1iEB14IUAAKM1WRo
>  e99f59709f6f4712a33f8a8d64249d45
>  Pn at 2LkB14IUAAKLWCv4
>  a85014387ae02cf8db4ec35b212de7ce
>  a7ee1a1dc4eaaaf6ef4c9b77af85dc7b
>  Pn at 4dUB14IUAALa5DpI
> (7 rows)
>
> Those '@'s don't belong, do they?
>
>
> On Mon, 24 Mar 2003, Marc G. Fournier wrote:
>
> > On Mon, 24 Mar 2003, Chuck Hagenbuch wrote:
> >
> > > Quoting "Marc G. Fournier" <scrappy at hub.org>:
> > >
> > > > Warning: Unknown(): The session id contains illegal characters, valid
> > > > characters are only a-z, A-Z and 0-9 in Unknown on line 0
> > >
> > > Someone else reported this, but never replied to a request for more
> > > information. Look at lib/Horde.php, in getCleanSession(). Figure out which
> > > method for generating a new session ID is giving the invalid characters, let
> > > us know, and we can look at it.
> >
> > Okay, I have to be doign this wrong, but it doesn't look like its even
> > getting that far:
> >
> >     function getCleanSession()
> >     {
> >         exit;
> >         Auth::clearAuth();
> >         @session_destroy();
> >
> > and a reload of the page and it still generates the same error ...
> >
> >
> >
>


More information about the dev mailing list