moodle-local_datacleaner icon indicating copy to clipboard operation
moodle-local_datacleaner copied to clipboard

Security check for online users may be too strict

Open abias opened this issue 7 years ago • 1 comments

Hi,

This problem report is targeted at the latest version of the plugin published on https://moodle.org/plugins/pluginversion.php?id=12918 and may be superseded by recent commits here in Github.

If you reset a Moodle production instance which has constantly some active users to a washing box instance and if your resetting script is really quick, you might see the fact that the local_datacleaner run denies to work because there are still "recently active" users in the database.

Looking at the code, I saw that local_datacleaner's security check checks if there were users active in the past 5 mins. So we could overcome this security check by adding a sleep of 3 minutes to our resetting script, but this is a rather cumbersome solution.

If you have any idea to prevent a false alarm of the security, I would be grateful.

Thanks, Alex

abias avatar Jan 23 '18 20:01 abias

Yeah this was always just me being paranoid. I think we could just tune this a bit lower or have a config.php only setting to force this to whatever value you want. I don't think we want to slow down the washing at all, we generally want that to be as fast as possible.

brendanheywood avatar Jan 24 '18 01:01 brendanheywood