If you open multiple tabs/windows on a site with Automated Logout 6.x-3.x-dev, offset by a few seconds, you won't be automatically logged out.*
The meta-tag page refreshes, offset by a few seconds and running in parallel, prevent autologout_lastaccess from exceeding the timeout.
Example with timeout=60:
t=0: Load page A in tab.
t=5: Load page B in tab.
t=60: Page A refreshes; autologout_lastaccess=5. That's less than 60 ago, so do not log user out.
t=65: Page B refreshes: autologout_lastaccess=60. That's less than 60 ago, so do not log user out.
t=120: Page B refreshes: autologout_lastaccess=65. That's less than 60 ago, so do not log user out.
...
* Well, eventually you will be, due to uneven page-loading times, but it will probably be a really long time.
Comments
Comment #1
threexk commentedJust to be clear, the second colon in both the t=65 and t=120 lines should be instead a semicolon.
Comment #2
Bevan commentedI don't believe this is the intended functionality. I believe it is supposed to disable multiple sessions across different cookie-stores — i.e. across different browsers (Firefox, Opera, Safari) on the same computer, or across different computers.
Comment #3
threexk commentedNot sure I follow. The idea of the Automated Logout module is to log you out after some period of inactivity (i.e., no page accesses), say 15 minutes. If you have two tabs open on the same site, you will never (until you're lucky) get logged out. So there is no automatic logout. This is by design?
Automatic logout prevents a user from accidentally leaving their session open and someone else using it without authorization.
Comment #4
threexk commentedTo clarify, the problem I described is seen with two tabs in a single browser.
Comment #5
jvandervort commentedI definitely see the problem of course, there is no period of inactivity. The dueling tabs keep up the activity...
I'll think on this some more and see if there is something we could do about it.
It speaks to the schizophrenic design of the autologout modules.
Are they really to enforce the users being logged out for the site or
to be a convenience for the user to not leave an open session? I think people
are using it for different reasons.
You could also use the 6.x-2.x branch and disable the browser refresh to solve that particular problem as the
6.x-3.x does not have the setting to do this.
Comment #6
jvandervort commentedWe should keep this open to discuss solutions.
Comment #7
jvandervort commentedAnother tidbit, you can disable meta-refresh in IE and Firefox which might be useful.
Also, there is no technical way to keep users from faking activity just to avoid being logged out.
Comment #8
vstmusic commentedI want to use your module to have a better security on my private website. But with this bug, I can't use it.
Comment #9
jvandervort commented@vstmusic, Use the 6.x-2.x autologout branch and set the Browser refresh delay" to -1. There is no solution to this using the automatic browser refresh builtin to the 6.x-3.x branch.
Comment #10
ti2m commentedTook me a day to figure out why the auto logout sometimes work and sometimes doesnt. Multiple tabs of course...
Here is an idea: why not attach a flag to the url when automatically refreshing? That way you can seperate real user activity and the auto refresh. Depending on that you either update $_SESSION['lastaccess'] or you substract time() - (int)$_SESSION['lastaccess'] from the the timeout. With two tabs the "faster" 1.tab would take the leftover timeout during auto refresh from the "slower" 2.tab. If the user is not active in the leftover period you get logged out at the end and both tabs even refresh (almost) at the same time.
This could be done with both the "meta-refresh" and JS. I put something together for 6.x-2.x branch. Can't supply a patch right away as I needed some other functionality with it and therefore altered the whole module but here's a snippet
Any thoughts?
Comment #11
johnennew commentedThis feature is properly supported in the 4 versions of autologout. Please try updating to 7.x-4.1 or 6.x-4.1