Which in effect means that cron execution from the admin page may have unexpected results, because the user may be permitted to do stuff that cron isn't really supposed to do.

The code that executes cron from the admin page - a call to elysia_cron_run() in elysia_cron_run_form_submit() - omits providing truthy $manual_run argument. Probably just a typo ;-)

However, the body of elysia_cron_run() has to be modified slightly too, because it currently treats all calls the same.
Thus it doesn't change the user to anonymous, even if given truthy $manual_run argument.

The issue applies to stable version 7.x-2.1 as well as 7.x-2.x-dev.

Will provide patches shortly.

Comments

jacobfriis’s picture

Actually,
Thus it doesn't change the user to anonymous, even if given truthy $manual_run argument.
wasn't true.
But it does mix up the algos for ordinary versus manual cron run.

Untested patch for stable version 7.x-2.1 attached.

jacobfriis’s picture

Untested patch for dev version 7.x-2.x attached.

gotheric’s picture

Assigned: Unassigned » gotheric
Status: Active » Patch (to be ported)
nitebreed’s picture

Issue summary: View changes
Status: Patch (to be ported) » Reviewed & tested by the community

Patch works nice!

  • kala4ek committed 4272898 on 7.x-2.x authored by jacobfriis
    Issue #1867528 by jacobfriis, Nitebreed: Manual cron run from module's...
kala4ek’s picture

Version: 7.x-2.1 » 7.x-2.x-dev
Assigned: gotheric » Unassigned
Status: Reviewed & tested by the community » Fixed

Checked and committed to latest dev.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.