Skip to content

fix: repair schema only after authorization; correct uninstall help - #79

Merged
somethingwithproof merged 1 commit into
mainfrom
fix/minor-review-findings
Nov 20, 2026
Merged

somethingwithproof merged 1 commit into
mainfrom
fix/minor-review-findings

Conversation

@somethingwithproof

Copy link
Copy Markdown
Owner

Fixes #77

Both minor findings were re-verified at current main and fixed.

  • config_arrays ran plugin_redfish_upgrade() (migrations, realm registration, template import) before Cacti checked the session, so an unauthenticated request to a plugin URL started it. The repair now runs from redfish_page_start() after redfish_page_allowed() succeeds. The Plugins page still repairs through check_config. Pages::upgradeTriggers() had no other use and is removed.
  • The Keep Plugin Tables help text claimed the plugin creates no Cacti devices. Reworded; the template, five catalogs and compiled .mo files are regenerated, with translations updated by hand.

Verification: Pest unit suite in php:8.2-cli, 292 passed; the new source-rule test fails on the old setup.php. locales/build_gettext.sh --check passes. Integration scripts run in CI only.

Risk: a non-admin who loses realm rows is no longer repaired by merely opening a page (page_allowed refuses first); an admin repairs via the Plugins page as before.

…help

The config_arrays hook ran plugin_redfish_upgrade() while Cacti loaded,
before its session check, so a request with no session could start
migrations and the template import. Run it from redfish_page_start() once
the request is authorized; plugins.php reaches it through check_config.

The Keep Plugin Tables help said the plugin creates no Cacti devices, which
stopped being true when device provisioning landed. Drop the clause and
update the catalogs.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
@coderabbitai

coderabbitai Bot commented Nov 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 58 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 495fd5f9-705b-417d-865a-0622fa9cc089
Commits

Reviewing files that changed from the base of the PR and between dd8d5b6 and 44ed57d.

Files selected for processing: 15

  • lib/Pages.php
  • lib/Settings.php
  • locales/LC_MESSAGES/ar-SA.mo
  • locales/LC_MESSAGES/es-419.mo
  • locales/LC_MESSAGES/es-ES.mo
  • locales/LC_MESSAGES/hi-IN.mo
  • locales/LC_MESSAGES/zh-CN.mo
  • locales/po/ar-SA.po
  • locales/po/cacti.pot
  • locales/po/es-419.po
  • locales/po/es-ES.po
  • locales/po/hi-IN.po
  • locales/po/zh-CN.po
  • setup.php
  • tests/Security/SourceRulesTest.php
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@sonarqubecloud

Copy link
Copy Markdown

@gitar-bot

gitar-bot Bot commented Nov 20, 2026

Copy link
Copy Markdown

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

@somethingwithproof
somethingwithproof merged commit d925264 into main Nov 20, 2026
20 checks passed
@somethingwithproof
somethingwithproof deleted the fix/minor-review-findings branch November 20, 2026 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Minor review findings

1 participant