-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use precise session lifetime for garbage collector #8671
Comments
I'm not sure, but we didn't consider such long lifetime of the session. Also, we used to not invalidate outdated sessions, so you could use it until it has been removed from the database. This is not the case anymore. I think the purpose was to not invalidate the session too soon in case of some temporary connection issues on the user side (which would case the keep-alive requests to fail). I'm thinking that nowadays we could remove that multiplier and see how that works. |
I have put together a stay logged in plugin that adds a toggle switch on the login page. By default, the sessions last 10 mins server side, and the cookie last only for the browser session. The plugin modifies the cookie expiration date to be how many number of days configured in the plugin. Only issue is that database garbage collection is based on I would like the plugin to become part roundcubes core plugins. I have seen lots of people desire this feature and always wondered why a stay-logged-in feature wasn't already built in. The plugin needs more language files contributed to, i made a small handful of them using google translate and have no idea how accurate the translations are. Are you interested? Can i do a PR adding the plugin to roundcube? It works as is, as long as you set For example, plugins hook Ideally i think it would be better if RC changed how it manages sessions. Instead of time stamping last activity as Not only would this guarantee stay-logged-in sessions don't accidentally get gc, it also allows for shorter gc on sessions who have not chosen to stay logged in, those sessions can still get gc in 10 mins. Please let me know if you are interested and how interested. Just add the plugin and leave RC code as is, or also making changes to RC code. Thank you. |
In relation to sessions and gc, i would like to suggest renaming When i was new to RC i assumed it meant browser sessions, i thought if i set the value to 7 days then users would stay logged in for 7 days, because session lifetime = 7 days. But in reality, sessions are hard coded to only last until the browser is closed and |
Create a PR and we'll consider that. |
Created PR #8689 for the plugin. |
Done. |
program/lib/Roundcube/rcube.php
Why is
$lifetime
being doubled? If you set$config['session_lifetime'] = 7*24*60;
intending to keep sessions for one week the garbage collection is being told to wait for two weeks before clearing old sessions?Is there a technical reason for this or am i misunderstanding what is happening in the code?
The text was updated successfully, but these errors were encountered: