mfreiholz / persistent_login

Provides a "Keep me logged in" aka "Remember Me" functionality for Roundcube.
78 stars 49 forks source link

persistent_login plugin causing session-related issues with new Roundcube 1.5 release #55

Closed ashdowntech closed 2 years ago

ashdowntech commented 2 years ago

We LOVE your plugin for RoundCube as it offers functionality that is very important to our customers.

In the latest release of RoundCube (1.5), we began having trouble with two items:

Issue 1

When selecting a layout in the Larry or the Classic theme, you can choose "List (no mail preview)" as an option in Preferences > Mailbox View > Main Options. If you save this option and then return to the main Mail screen, there will just be list of email with no preview pane as expected.

However, if you simply allow the browser screen to sit idle with no interaction for 5 or 10 minutes, the preview pane will suddenly appear.

Once the preview pane has appeared, you cannot get rid of it by using the small gear dropdown in the header row of the email listing and trying to set it back to list in the pop-up window that appears. Only going to Settings and saving Preferences > Mailbox View, will reset it. However, after several minutes, the preview pane will reappear automatically again.

Issue 2

For those customers who have their Roundcube refresh set to "every 10 minutes" or higher and then don't interact with their browser for a while, an error occurs and appear in the area of the screen where the email listing usually is. It is titled, "File Not Found" and says, "The requested resource was not found! Please contact your system administrator. _Failed request mail.redactedmailservername.com/mail/?_task=mail&action=keep-alive"

This is always accompanied by an error in the logs on the server that say, "PHP Error: Error loading template for in /usr/local/lib/roundcubemail/program/include/rcmail_output_html.php on line 804 (GET /mail/?_task=mail&_action=keep-alive)"

You'll note that there is a blank between "for" and "in" that is where a template name should appear. However, there isn't one.

The workaround is to set the refresh to less than 10 minutes. That works, but this was not an issue in previous RC versions and some people would prefer less frequent auto-refreshing or to manually refresh the page themselves as needed.

Notes

After posing both of these to the Roundcube folks, they indicated they thought it might be a plugin-related issue. I went in and temporarily deactivated all of the defined plugins in config.inc.php. The problems went away. I then reactivated all of the plugins EXCEPT persistent_login. The problems were still gone.

We use the Mail-in-a-box server package which is also on GitHub. One of the devs there suggested some fixes, which we can implement, but to have them added to the package and released would be a welcome and permanent change. You can see the thread of information here: https://github.com/mail-in-a-box/mailinabox/issues/2052

Thank you so much for your help with this important plugin.