bug: Webcron handler missing return after sendJsonResponse on auth failure #79

Closed
opened 2026-06-21 23:01:39 +00:00 by jmiller · 0 comments
Owner

Severity: HIGH

In the system plugin's onAfterInitialise, after calling sendJsonResponse() for invalid secret or disabled webcron, there is no return statement. While sendJsonResponse() calls $app->close(), if close() is somehow non-terminal (tests, custom app subclass), execution falls through to the backup logic unauthenticated.

Fix

Add return; after each sendJsonResponse() call in the auth checks.

File

  • plg_system_mokosuitebackup/src/Extension/MokoSuiteBackup.php:62-74
## Severity: HIGH In the system plugin's `onAfterInitialise`, after calling `sendJsonResponse()` for invalid secret or disabled webcron, there is no `return` statement. While `sendJsonResponse()` calls `$app->close()`, if `close()` is somehow non-terminal (tests, custom app subclass), execution falls through to the backup logic unauthenticated. ## Fix Add `return;` after each `sendJsonResponse()` call in the auth checks. ## File - `plg_system_mokosuitebackup/src/Extension/MokoSuiteBackup.php:62-74`
jmiller added the component: engine label 2026-06-21 23:01:39 +00:00
Sign in to join this conversation.
Priority Medium
Type Feature
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoSuiteBackup#79