catalyst / moodle-local_datacleaner

Reduce, filter, and anonymize moodle data for non-prod environments
https://moodle.org/plugins/local_datacleaner
19 stars 17 forks source link

Security check for online users may be too strict #58

Open abias opened 6 years ago

abias commented 6 years ago

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

brendanheywood commented 6 years ago

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.