[dokuwiki] Re: separate cookies for multiple wikis on the same site
- From: Koen Huybrechts <huybkoen@xxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Sun, 26 Jun 2005 19:31:56 +0200
Sameer D. Sahasrabuddhe wrote:
Hi,
Here's a patch to take care of cookies when you have multiple wikis on
the same site. Basically the wikis get confused since all of them use
the identifier DokuWikiAUTH to identify the cookie.
I had tried using the "path" argument to "setcookie", but it didn't
seem to work. Anyway the PHP documentation mentions that the path
argument is not handled correctly by IE 4, so decided to try something
else.
I replaced the name 'DokuWikiAUTH' with a constant DOKU_COOKIE.
auth.php sets this constant to the md5 hash of
$_SERVER['SCRIPT_NAME'] since that contains enough path information to
make it unique on a particular site. I had tried using "urlencode" but
that does not provide an acceptable cookie identifier according to the
Netscape cookie spec. Using an md5 works quite well. I have two copies
of a recent darcs version, both running side by side ... they no
longer confuse the auth information stored in the cookies.
Sameer.
hi,
Thanks a lot to fix this problem!!
I also have a few wikis on the same site, so I'll test it and let you
know if there are any problems
koko
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
- Follow-Ups:
- [dokuwiki] Re: separate cookies for multiple wikis on the same site
- From: Sameer D. Sahasrabuddhe
- References:
- [dokuwiki] separate cookies for multiple wikis on the same site
- From: Sameer D. Sahasrabuddhe
Other related posts:
- » [dokuwiki] separate cookies for multiple wikis on the same site
- » [dokuwiki] Re: separate cookies for multiple wikis on the same site
- » [dokuwiki] Re: separate cookies for multiple wikis on the same site
- » [dokuwiki] Re: separate cookies for multiple wikis on the same site
- » [dokuwiki] Re: separate cookies for multiple wikis on the same site
- » [dokuwiki] Re: separate cookies for multiple wikis on the same site
- » [dokuwiki] Re: separate cookies for multiple wikis on the same site
Hi,
Here's a patch to take care of cookies when you have multiple wikis on the same site. Basically the wikis get confused since all of them use the identifier DokuWikiAUTH to identify the cookie.
I had tried using the "path" argument to "setcookie", but it didn't seem to work. Anyway the PHP documentation mentions that the path argument is not handled correctly by IE 4, so decided to try something else.
I replaced the name 'DokuWikiAUTH' with a constant DOKU_COOKIE. auth.php sets this constant to the md5 hash of $_SERVER['SCRIPT_NAME'] since that contains enough path information to make it unique on a particular site. I had tried using "urlencode" but that does not provide an acceptable cookie identifier according to the Netscape cookie spec. Using an md5 works quite well. I have two copies of a recent darcs version, both running side by side ... they no longer confuse the auth information stored in the cookies.
Sameer.
hi,
- [dokuwiki] Re: separate cookies for multiple wikis on the same site
- From: Sameer D. Sahasrabuddhe
- [dokuwiki] separate cookies for multiple wikis on the same site
- From: Sameer D. Sahasrabuddhe