Needs work
Project:
Bakery Single Sign-On System
Version:
3.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 Mar 2011 at 21:19 UTC
Updated:
16 May 2025 at 17:03 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
coltraneIt's not clear to me that this is an issue in the Bakery code.
Comment #3
antgiant commentedPerhaps this is a clearer way to describe the problem.
The Bakery cookie is set in two places
If both cases you'll notice that the third parameter is
$_SERVER['REQUEST_TIME'] + variable_get('bakery_freshness', '3600').However, the code that verifies the cookie is stil valid looks like this.
Due to the joys of working with cookies this means that every Bakery cookie effectivly has 2 expiration dates.
$cookie['timestamp'] + variable_get('bakery_freshness', '3600') >= $_SERVER['REQUEST_TIME']That second option is the one that is causing me trouble. As far as I can tell there are two ways to solve this problem.
Comment #4
gregglesOf your two solutions I think #2 is better. Relying on javascript for a session related feature seems like a poor choice.
Can you post a patch of #2?
Comment #5
antgiant commentedPatch changes cookie expiration on client computer to 10 years beyond default expiration. That should resolve all but the most extreme of incorrect client clock problems.
Comment #6
gregglesThis needs comments as to why we are doing it.
1. By the setcookie comments explaining 10 years of time
2. By whatever code will get rid of these cookies in the timeframe of less than 10 years time
Comment #7
antgiant commentedFor some reason I don't quite understand my copy of Git will only create multiple patches for me. I'm probably doing something wrong. Hope that is not to much of a problem.
First patch is unchanged from above. Second patch adds comments requested by greggles.
Comment #8
antgiant commentedForgot to mark it as needs review. Sorry.
Comment #9
coltraneReroll with mods to comments. RTBC.
Comment #10
coltraneWell, I want to think on this a little more and run some tests.
Comment #11
purencool commentedTest to see if this still is happening in the latest version.
Comment #12
avpaderno