MantisBT: master 0d765207

Author Committer Branch Timestamp Parent
dregad dregad master 2026-09-26 19:14 master c13bb527
Affected Issues  0020359: Running admin/check/index.php is possible without log in
Changeset

Prevent Admin Checks execution by non-admin users

Adding an access_ensure_global_level() call at the start of the script,
to deny access to non-admin users.

This requires a valid DB connection to retrieve the user's cookie, so we
call db_connect() first. Since it is possible that the DB is not
available (e.g. running admin check to troubleshoot installation issues)
we could be unable to identify the user, in which case we just continue
assuming they are the admin.

Since we already have a database connection, there is no need to call
db_connect() again in check_database_inc.php, we can just check the
status with db_is_connected().

Fixes 0020359

mod - admin/check/check_database_inc.php Diff File
mod - admin/check/index.php Diff File