Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

--- develop ---

* bug: Pass a boolean (not the integer 1) to api_plugin_register_hook()'s $enable argument so the hook registration stays type-correct under Cacti 1.3's strict bool type-hint (the int only coerces while the file lacks declare(strict_types=1))
* bug: Skip audit logging on CLI/poller requests until the `request_status` column exists, instead of emitting "Unknown column 'request_status'" errors when the audit_log schema migration (which only runs on plugins.php/audit.php page loads) has not yet applied; likewise make the shutdown-time request finalizer (`audit_finalize_request()`), which writes `request_status`, best-effort (its writes pass `$log = false`) so it fails quietly instead of logging "Table 'audit_log' doesn't exist" when the table was dropped (e.g. plugin uninstall) after `db_table_exists()`'s request-scoped cache was primed
* dev: Enforce patch coverage of changed lines in CI and remove the inert COMPOSER_ROOT_VERSION env from the Pest step
* dev: Relocate the schema/DB provisioning helpers (`audit_setup_table()`, `audit_setup_syslog_table()`, `audit_setup_user_log_state_table()`, `audit_upgrade_event_schema()`, and the user_log index helpers) from `setup.php` into `includes/database.php` to align with the fleet schema/includes convention, and add a root `manifest.json` with upgrade-time file pruning (`audit_prune_files()`) plus a CI manifest drift check (`tests/bin/validate-manifest.php`)
Expand Down
10 changes: 5 additions & 5 deletions setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -402,11 +402,11 @@ function audit_check_upgrade(): void {
[$info['version'], $info['longname'], $info['author'], $info['homepage'], $info['name']]);

// hook for table replication
api_plugin_register_hook('audit', 'replicate_out', 'audit_replicate_out', 'setup.php', 1);
api_plugin_register_hook('audit', 'is_console_page', 'audit_is_console_page', 'setup.php', 1);
api_plugin_register_hook('audit', 'logout_pre_session_destroy', 'audit_logout_pre_session_destroy', 'setup.php', 1);
api_plugin_register_hook('audit', 'logout_post_session_destroy', 'audit_logout_post_session_destroy', 'includes/functions.php', 1);
api_plugin_register_hook('audit', 'custom_denied', 'audit_custom_denied', 'includes/functions.php', 1);
api_plugin_register_hook('audit', 'replicate_out', 'audit_replicate_out', 'setup.php', true);
api_plugin_register_hook('audit', 'is_console_page', 'audit_is_console_page', 'setup.php', true);
api_plugin_register_hook('audit', 'logout_pre_session_destroy', 'audit_logout_pre_session_destroy', 'setup.php', true);
api_plugin_register_hook('audit', 'logout_post_session_destroy', 'audit_logout_post_session_destroy', 'includes/functions.php', true);
api_plugin_register_hook('audit', 'custom_denied', 'audit_custom_denied', 'includes/functions.php', true);
}
}

Expand Down
Loading