Cann't logoff

5 posts by 3 authors in: Forums > CMS Builder
Last Post: March 5, 2009   (RSS)

Re: [glenara] Cann't logoff

By Dave - March 4, 2009

Hi glenara,

What web server software are you using? There was a problem with an older version of Microsoft IIS where it sometimes would set (or unset) cookies when you're doing a redirect.

If you want to send me CMS and FTP login details to dave@interactivetools.com (email, don't post login details to the forum) I can try and recreate the bug and fix it if it's related to the code.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Cann't logoff - The solution

By ITI - March 4, 2009 - edited: March 4, 2009

Well that makes sense then. My Dev machine is a windows 2003 server and production machine is still a windows 2000 server.

So I guess the quick fix is javascript:

if (@$_REQUEST['action'] == 'logoff') {
removePrefixedCookie('username');
removePrefixedCookie('passwordHash');
removePrefixedCookie('randNumber');
removePrefixedCookie('editorStates'); // I also added this.

$url = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'];
//header("Location: $url");
echo("<script type='text/javascript'>location.href='$url'</script>");
exit;
}

It appears that on the win 2000 if you don't actually exit the script the new cookie info isn't sent or deleted.
Using javascript to perform the redirection does the trick.

Glen
Glen







http://www.CanadianDomainRegistry.ca







ITI Internetworking Technologies Inc.

Re: [glenara] Cann't logoff - The solution

By ross - March 5, 2009

Hi Glen

I'll make sure Dave sees the fix you came up with. For now though, I just want to make sure this did in fact get things going for you.

If you are still running into trouble getting logged off, let me know and we'll keep at it :).
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] Cann't logoff - The solution

By ITI - March 5, 2009

No problems, this solution works perfectly. Javascript has to be on anyway and I shouldn't still be using the win 2000 machine. Regardless, if some one else should have a similar issue with an operating system this works. All the cookie data is completely removed and the login screen is displayed just as it's supposed to.
Glen







http://www.CanadianDomainRegistry.ca







ITI Internetworking Technologies Inc.