Topic: Cookie bug found

Hi! Just want to say that I'm new to PunBB but this board suite is awesome, works great!

Anyways, I have 2 copies of PunBB installed on the same server, with the same domain. Both versions installed are 1.2.1 and I am the admin on both. If I login to one version on one board and have it remember me, then visit the other board and have that remember me, I find that only the last board remembers my login, not both. Visiting one board after the other causes me to have to relogin even though it should remember me.

Definetly seems like a bug to me. Cheers!

Re: Cookie bug found

It's not a bug. You'll just have to adjust $cookie_domain or $cookie_name in each forum's config.php. You can't have two cookies with the same name for the same domain.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Cookie bug found

Ah ok, that makes sense. Every consider using something like md5() to create unique names so that option isn't needed?

Re: Cookie bug found

erm, md5 wouldn't work: that would only make the cookie name into a hash tongue
Random names would work. However, that would make the name meaningless: changing $cookie_name in config.php to a different name for each board makes a lot more sense wink

Re: Cookie bug found

I haven't, but maybe it's not a bad idea.

Edit: By that I mean padding the cookie name with e.g. 4 random numbers during install.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Cookie bug found

Err doh! I was tired when I wrote that reply (not turn into hash but generate unique name... mmm sleep i think me needs), but yeah, some kind of random name to differiante cookies incase you have 2 or more boards on the same name would clear that up!