You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Any logged-in user can run any module's dosql handler; index.php has no module access check #463
index.php (L234–245 on dev-5.0.0 @ 179b4eaf) checks the form token and then requires modules/<m>/<dosql>.php for any logged-in user. It never checks that the user can access module m, so each module's do_* handler has to do its own permission checks. Handlers that forget can be reached by users who can't even open the module.
Found while testing the HelpDesk add-on on dev-5.0.0 (web2project/modules-helpdesk). A user with the Empty Role gets access denied on m=helpdesk but could still POST m=helpdesk, dosql=do_item_aed, del=1, item_id=1 with their own __nonce, and the ticket was deleted. (The add-on's own missing canDelete() check is filed on its repo.)
The core handlers mostly rely on BaseObject::store()/delete() calling canEdit()/canCreate()/canDelete(). Even so, a module-level gate would close the whole class of bugs for core and add-ons.
Suggested fix: before the dosql require, refuse the request unless $AppUI->isActiveModule($m) and canAccess($m) pass (redirect to ACCESS_DENIED). The same check for a=do_* in the module dispatch. Keep the per-object checks as they are.
Reproduced on dev-5.0.0 @ 179b4eaf, PHP 8.3.6, MariaDB 10.11.
Activity
index.php: refuse dosql and do_* requests for modules the user can't …
Users: only the user or a Users editor can see or replace a feed URL
Only load pages of active modules the user can access
Document the module access check and custom-field saving in the add-o…
Document the module access check and custom-field saving in the add-o…