[pmwiki-users] Password Anomaly

Dominique Faure dominique.faure at laposte.net
Sun Feb 20 15:03:00 CST 2005


> I did some more tests, and found that there were two cookies set with
> name PHPSESSID, one of which was set to expire at the ned of the
> browser session, the other in a years time (10 Feb 2006). when i
> deleted this last cookie and exited firefox, and then restarted
> firefox, the password dialogue came up.

Last month, I post a config.php snippet which add a new 'logout' action:
-----8<---------------------------------------------------------
SDV($HandleActions['logout'], 'HandleLogout');

function HandleLogout($pagename) {
        session_start();
        session_unset();
        if (isset($_COOKIE[session_name()])) {
                setcookie(session_name(), '', time() - 42000, '/');
        }
        session_destroy();
  Redirect($pagename);
}
-----8<---------------------------------------------------------

IMHO, beta22 with its new TmplSection(s) is perfect to handle a new 
<!--LoginActionFmt--> skin subsection which could handle all this, providing 
an author+password fields with a login link or simply a logout link 
according to cookie content.

Dominique




More information about the pmwiki-users mailing list