-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New plugin: Persisted login #9976
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
base: master
Are you sure you want to change the base?
Conversation
|
The E2E-tests are green locally. I'll fix them in the CI next week. |
1f9032c to
96424bd
Compare
|
Thank you for the review! I changed the styling as requested and added support for derivate skins. |
96424bd to
eaeaba2
Compare
|
The PHP8.5 deprecation warning in the Unit tests is fixed via DASPRiD/Enum#18 |
This plugin adds a toggle switch into the login form of Roundcubemail's "elastic" skin, that makes the session live for a configured number of days (instead of only for the session).
eaeaba2 to
492aa33
Compare
|
I fixed the Browser tests by changing the plugin behaviour a little bit: It now uses a default of 7 days, and a minimum of 1 day. Setting |
|
A composer.json file is missing. ps. I don't like one thing about this plugin. It changes session lifetime for everyone. Which means all session records are garbage collected after X days. It probably should be fixed with a "expires at" column in the session table. It's not a stopper, I suppose. |
Yes, but isn't that a necessary evil? If you don't extend the 'session_lifetime' then GC will remove the server side session even though the browser cookie is saved in the browser for x number of days.
But doesn't that require a fundamental change to the core of roundcube and outside of the scope of a plugin? |
|
I also don't really like to rely on the clients to respect the expiry-timestamp of the cookie, either, but decided to go with it for now. But as we agree on that part maybe we should do it properly and implement this features in core code, using an @alecpl Do you agree? |
|
And as far as I see we don't need the |
What do you mean we don't need it? It is a very important column. We'd need both |
|
From the code in |
|
In c69f02f (branch |
|
You might be right that one column would suffice. However, "time since the last change" is not the same as "time to expiry" It would be easier to review if I could see the changed -> expires_at change separately from the persistent login. |
|
Here's a PR with only the change to the session expiry without the new feature: #9990
You're right, but as far as I can tell we use the timestamp only for expiry, and not for anything else. |
This plugin adds a toggle switch into the login form of Roundcubemail's "elastic" skin, that makes the session live for a configured number of days.
Adapted from #8689
Hat tip and thanks to @Github-Citizen