Bug Reports

Forum >> Bug Reports >> Cookie Domain & Expiry   Bookmark This Forum Thread

Post ID Date & Time Game Date Function
BrianV
Joined: 02/08/2016
Posts: 125

Inactive

Broken Bat Baseball
Hi Steve,

If you visit 'brokenbat.org', cookies are set with 'brokenbat.org' as the domain.

If you visit 'brokenbat.org', you get cookies with the 'brokenbat.org' domain.

This means that as a user, I have different sessions based on the domain. That is, I can be logged in at 'http://brokenbat.org' and logged out at 'http://brokenbat.org'.

This gets annoying when you follow links in the forum which point to the opposite domain form the one you logged in at, and you are suddenly logged out again.

If you made both domains set the cookie domain as 'brokenbat.org', both addressess (www- and non-www) would share the same session. That is, a login at brokenbat.org would also log you in at brokenbat.org, and vice versa.

Alternatively, a perhaps a better solution may be to redirect the www- version of your site to the non-www version (or vice-versa) in .htaccess (assuming you are running Apache).

Finally, it would be nice if you would add a 'Remember me' option to the login dialogue that would set the cookie expiry somewhere in the far future, like a year ahead. Currently the cookie is set to expire at the end of the session. This leaves me logging in 5-6 times per day. It would be nice to not have to log in every time I open my browser to check BB!
newtman
Joined: 11/02/2013
Posts: 3343

Inactive

Broken Bat Baseball
Mine remembers me, I think that may be browser or device specific (I'm running Firefox on a Windows 10 desktop). Might want to check if you are allowing cookies from brokenbat. The other part is something I hope Steve can do something about someday as it is a problem that has been around as long as I have.
BrianV
Joined: 02/08/2016
Posts: 125

Inactive

Broken Bat Baseball
@Newtman - the browser will remember the username and password when you load the login page. I'm just suggesting that you shouldn't have to go to the login page at all - you should just be 'logged in' until you choose to log out.
Rock777
Joined: 09/21/2014
Posts: 9602

Haverhill Halflings
III.1

Broken Bat Baseball
That explains why sometimes links in the forums pop open a window with me logged out.
admin
Joined: 01/27/2010
Posts: 4985

Administrator
Broken Bat Baseball
Okay...I'll look into this.

Thanks,

Steve
admin
Joined: 01/27/2010
Posts: 4985

Administrator
Broken Bat Baseball
Okay...I think this might be fixed now.

example:
normal link: Sherman Galli

www link: Sherman Galli

Steve

Updated Tuesday, November 29 2016 @ 11:12:11 pm PST
AssumedPseudonym
Joined: 10/26/2016
Posts: 1130

Deerfield Beach Rats
V.7

Broken Bat Baseball
 Seems to be working, yep. Does for me, at least.
admin
Joined: 01/27/2010
Posts: 4985

Administrator
Broken Bat Baseball
Yeah, I'm just a little worried that the fix might break something else.


Steve
newtman
Joined: 11/02/2013
Posts: 3343

Inactive

Broken Bat Baseball
It is working for me, really nice to see this issue fixed. Thanks!
Haselrig
Joined: 04/13/2014
Posts: 2790

Novi Doubledays
III.4

Broken Bat Baseball
Only thing broken for me so far was my browser forgot my password to the site. Had to scramble to find it :)
Rock777
Joined: 09/21/2014
Posts: 9602

Haverhill Halflings
III.1

Broken Bat Baseball
Works for me :)
admin
Joined: 01/27/2010
Posts: 4985

Administrator
Broken Bat Baseball
Had to disable this fix temporarily because it wasn't working on the local setup. Just need to put a little more work in to get this working on both locations.

Steve
admin
Joined: 01/27/2010
Posts: 4985

Administrator
Broken Bat Baseball
Okay...I think I have another fix for it.

Steve
Rock777
Joined: 09/21/2014
Posts: 9602

Haverhill Halflings
III.1

Broken Bat Baseball
I still have the same old issue. Went away with the other fix, but not this one.
admin
Joined: 01/27/2010
Posts: 4985

Administrator
Broken Bat Baseball
What exactly doesn't work and how to you reproduce the issue?

The first fix translated all the brokenbat.org URLs to just brokenbat.org. That fixed the problem, but broke other things.

Now, I'm just translating brokenbat in forum posts to the brokenbat. That fixes the forum issue (as far as I can tell). So what is the case you're having??


Thanks,

Steve
Rock777
Joined: 09/21/2014
Posts: 9602

Haverhill Halflings
III.1

Broken Bat Baseball
If I click on any of the links on [url=http://www..brokenbat.org/forum/0/2/4490]this page[/url] for example, they open a new window where I am no longer logged in.

Currently I have http://www..brokenbat.org/ bookmarked. Maybe I just need to change my bookmark to http://brokenbat.org/?



Updated Friday, December 23 2016 @ 7:23:55 am PST
admin
Joined: 01/27/2010
Posts: 4985

Administrator
Broken Bat Baseball
If you click on it from the forum post, then you shouldn't have any problems. If you have in bookmarked in your browser, then yeah, it's probably still a problem (you might update your bookmark).

Steve
Rock777
Joined: 09/21/2014
Posts: 9602

Haverhill Halflings
III.1

Broken Bat Baseball
Updating the bookmark works. The problem is anyone who comes into www..brokenbat.org (like from Google), will have the same issue. It would really probably be better to be doing the opposite. Change the brokenbat.org links in the forum posts to www..brokenbat.org. That way anyone coming to this site from an external site won't have problems if they decide to bookmark the page. Its much less likely anyone would bookmark brokenbat.org since that isn't the address that would normally bring you here.

TL/DR

If you come into the site as brokenbat.org, you will have not problems. If you come into the site as www..brokenbat.org (the more normal way), than you will have the problem.


P.S. the extra dot is just because otherwise it gets converted back to brokenbat.org, LOL


Updated Friday, December 23 2016 @ 7:24:37 am PST
Rock777
Joined: 09/21/2014
Posts: 9602

Haverhill Halflings
III.1

Broken Bat Baseball


Updated Friday, December 23 2016 @ 7:22:25 am PST
BrianV
Joined: 02/08/2016
Posts: 125

Inactive

Broken Bat Baseball
Hi Steve,

Instead of just rewriting links in the forum, it may be easier to just to do a 301 redirect in the Apache setup:

https://www.digitalocean.com/community/tutorials/how-to-redirect-www-to-non-www-with-apache-on-ubuntu-14-04





Previous Page | Show Page |