Date: 01/19/00
- Next message: garyb <email protected>: "[PHPLIB] Anybody got a load tester?"
- Previous message: garyb <email protected>: "Re: [PHPLIB] Calling Javascript from php"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
If you call $sess->delete() on a session that is operating in "get" mode,
when the delete() function calls $sess->put_id() the switch statement there
will match "get" mode and execute die() - making it impossible to finish a
normal logout page while still correctly deleting the session from the
storage container.
I'd suggest rewriting that function like so:
function put_id () {
switch ($this->mode) {
case "cookie":
global $HTTP_COOKIE_VARS;
$this->name = $this->cookiename == '' ? $this->classname : $this->cookiename
SetCookie($this->name, '', 0, '/', $this->cookie_domain);
$HTTP_COOKIE_VARS[$this->name] = '';
break;
default:
// do nothing
break;
}
}
That way cookies get deleted, but other types of sessions can still
successfully delete themselves from the storage container.
-chuck
-- Charles Hagenbuch, <chagenbu <email protected>> -- " ... I mean, who wouldn't look forward to waking up in the morning and having a nice big bowl of frosted For-Next Loops ... " - Slashdot comment - PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>. To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in the body, not the subject, of your message.
- Next message: garyb <email protected>: "[PHPLIB] Anybody got a load tester?"
- Previous message: garyb <email protected>: "Re: [PHPLIB] Calling Javascript from php"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

