[ACCEPTED] Session Cookie Getting Lost

Members can make suggestions for improving the site and improving the forum as well as submit bug reports to be reviewed by our support team here.
Post Reply
Message
Author
User avatar
flash2015
Gold Donator
Gold Donator
Posts: 3200
Joined: Fri Sep 29, 2017 7:55 pm
Location: Planet Earth
Karma: 1155
Contact:

[ACCEPTED] Session Cookie Getting Lost

#1 Post by flash2015 » Mon Feb 05, 2018 6:37 pm

Hi,

I am seeing in some scenarios the session cookie(s) getting lost...and I am being shown as logged out. For instance if I go here to look at the championship crown game series:

http://www.webdiplomacy.net/contrib/php ... p?f=7&t=85

And I click on one of the games it shows me as logged out. Is this just me...or are other people seeing this as well?

Of course if I go back and continue to browse the site (e.g. click home from the "championship crown series" page) then my user is still there.

Aereaux
Posts: 50
Joined: Sun Dec 31, 2017 12:28 am
Karma: 4
Contact:

Re: Session Cookie Getting Lost

#2 Post by Aereaux » Mon Feb 05, 2018 6:44 pm

I think this happens when you go from the www subdomain to the top level domain or vice-versa.

User avatar
flash2015
Gold Donator
Gold Donator
Posts: 3200
Joined: Fri Sep 29, 2017 7:55 pm
Location: Planet Earth
Karma: 1155
Contact:

Re: Session Cookie Getting Lost

#3 Post by flash2015 » Mon Feb 05, 2018 7:33 pm

Surely the cookies should be set on "/"? Perhaps I need to get out the wireshark.

User avatar
ghug
Bronze Donator
Bronze Donator
Posts: 17580
Joined: Mon Mar 20, 2017 3:51 pm
Location: Seattle
Karma: 11399
Contact:

Re: Session Cookie Getting Lost

#4 Post by ghug » Mon Feb 05, 2018 7:43 pm

Check that you're logged in both to webdiplomacy.net and www.webdiplomacy.net.

I think most sites redirect to one or the other, whereas we don't. It's definitely a little weird, but such is life.

User avatar
flash2015
Gold Donator
Gold Donator
Posts: 3200
Joined: Fri Sep 29, 2017 7:55 pm
Location: Planet Earth
Karma: 1155
Contact:

Re: Session Cookie Getting Lost

#5 Post by flash2015 » Tue Feb 06, 2018 5:38 am

OK, this is a bug then. You should be able to use one cookie across www.webdiplomacy.net and webdiplomacy.net:

https://stackoverflow.com/questions/184 ... and-domain

i.e. we should be able to do in the webdip code:

Set-Cookie: JSESSIONID=xxx; domain=webdiplomacy.net

which will work across both domains (RFC 6265).

A_Tin_Can
Lifetime Site Contributor
Posts: 283
Joined: Fri Sep 29, 2017 9:18 pm
Karma: 451
Contact:

Re: Session Cookie Getting Lost

#6 Post by A_Tin_Can » Wed Feb 07, 2018 7:12 am

Thanks for the link! I've created the bug report here: https://github.com/kestasjk/webDiplomacy/issues/284

Post Reply

Who is online

Users browsing this forum: No registered users and 96 guests