Skip to content

backport: hardening and bugfixes for main stable#283

Open
somethingwithproof wants to merge 491 commits intoCacti:mainfrom
somethingwithproof:backport/main-hardening-v2
Open

backport: hardening and bugfixes for main stable#283
somethingwithproof wants to merge 491 commits intoCacti:mainfrom
somethingwithproof:backport/main-hardening-v2

Conversation

@somethingwithproof
Copy link
Contributor

Consolidated backport of security and bugfix PRs.

TheWitness and others added 30 commits March 13, 2022 17:18
- Remember the settings for remote databases
- Properly get the MariaDB version safely
* Add files via upload

* Add files via upload

* Delete cacti-syslog-connector.py

* add contrib
- Reorganized the polling process to be more readable/structured/streamlined
- Support Cacti's process interlock functions in the processing of syslog messages
- Add new columns for upcoming features
- Logging features to be delivered in the 4.0 release
- Modifying form language to be less duplicative
- Update language file.

Many aspects of the poller process are still in process.  However, the plugin should continue to function during that process.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
weblate and others added 21 commits October 22, 2025 12:18
Updated by "Squash Git commits" hook in Weblate.

Translation: Cacti/syslog
Translate-URL: https://translate.cacti.net/projects/cacti/syslog/
Currently translated at 100.0% (385 of 385 strings)

Co-authored-by: Daniel Nylander <daniel@danielnylander.se>
Translate-URL: https://translate.cacti.net/projects/cacti/syslog/sv/
Translation: Cacti/syslog
Updated by "Squash Git commits" hook in Weblate.

Translation: Cacti/syslog
Translate-URL: https://translate.cacti.net/projects/cacti/syslog/
Currently translated at 100.0% (385 of 385 strings)

Co-authored-by: Daniel Nylander <daniel@danielnylander.se>
Translate-URL: https://translate.cacti.net/projects/cacti/syslog/sv/
Translation: Cacti/syslog
Updated by "Squash Git commits" hook in Weblate.

Translation: Cacti/syslog
Translate-URL: https://translate.cacti.net/projects/cacti/syslog/
Currently translated at 100.0% (385 of 385 strings)

Co-authored-by: Daniel Nylander <daniel@danielnylander.se>
Translate-URL: https://translate.cacti.net/projects/cacti/syslog/sv/
Translation: Cacti/syslog
Updated by "Squash Git commits" hook in Weblate.

Translation: Cacti/syslog
Translate-URL: https://translate.cacti.net/projects/cacti/syslog/
* agents

* Update copilot-instructions.md

* correct filename spelling
* agents

* Update copilot-instructions.md

* add missing return

* Update syslog.css

* Allow grouping of similar messeges in the UI

This feature allows users to group messeges based on similar text and host
This is useful for when a host has been sending  repeted alarms of the same type

* Clean up JS code

Move JS functions to functions.js file
- Easier and cleaner

* Update .github/ISSUE_TEMPLATE/agents/mysql-mariadb.agent.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/ISSUE_TEMPLATE/agents/code-quality.agent.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/ISSUE_TEMPLATE/agents/mysql-mariadb.agent.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/ISSUE_TEMPLATE/agents/mysql-mariadb.agent.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/ISSUE_TEMPLATE/agents/mysql-mariadb.agent.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update js/functions.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update js/functions.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix formatting in syslog.php

* Update syslog.php

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update syslog.php

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/ISSUE_TEMPLATE/agents/php-devloper.agent.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Correct filename spelling

* Migrate autocomplete js function

* Migrate syslog messege display JS to cleaner function

* Update .github/ISSUE_TEMPLATE/copilot-instructions.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update mysql-mariadb.agent.md

* Update php-developer.agent.md

* Update .github/ISSUE_TEMPLATE/copilot-instructions.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update functions.php

* Update functions.js

Correct a few memory leaks

* Update syslog.php

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update syslog.php

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* update change log

* Update README.md

add note on expanding the group_concat_max_len  variable
for the grouping feature

* Update functions.js

memory leak

---------

Co-authored-by: TheWitness <thewitness@cacti.net>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* agents

* Update copilot-instructions.md

* correct filename spelling

* Move agents folder to proper place
* agents

* Update copilot-instructions.md

* correct filename spelling

* Move agents folder to proper place

* add gha

* Update codeql.yml

* rename file

* Create php-lint.yml

* Update phpstan.yml

* Update php-lint.yml

* .

* .

* Update install-syslog-cacti.yml

* Update populate_syslog_incoming.sh

* .

* Update install-syslog-cacti.yml

* rename file prepare for PR

* Update populate_syslog_incoming.sh

* add removal and alert rules

* add output for tracing

* Update plugin-ci-workflow.yml

* Update plugin-ci-workflow.yml

* Update plugin-ci-workflow.yml
* agents

* Update copilot-instructions.md

* correct filename spelling

* Move agents folder to proper place

* add gha

* Update codeql.yml

* rename file

* Create php-lint.yml

* Update phpstan.yml

* Update php-lint.yml

* .

* .

* Update install-syslog-cacti.yml

* Update populate_syslog_incoming.sh

* .

* Update install-syslog-cacti.yml

* rename file prepare for PR

* Update populate_syslog_incoming.sh

* add removal and alert rules

* add output for tracing

* Update plugin-ci-workflow.yml

* Update plugin-ci-workflow.yml

* Update plugin-ci-workflow.yml

* Update agent tools

* Triage Agent
* agents

* Update copilot-instructions.md

* correct filename spelling

* Allow for resolving syslog device ip against cacti hosts table

Some devices dont send the device name as the hostname for syslog instead they send the IP
This feature will allow for resolving the IP against the cacti host table  as the device may not be in DNS

* Update .github/ISSUE_TEMPLATE/agents/mysql-mariadb.agent.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/ISSUE_TEMPLATE/agents/mysql-mariadb.agent.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update functions.php

* Consolodate setting

Update the flow as follows

1) If we recive a host check DNS
2.) if the IP is not in DNS check the cacti host table
3.) Mark as invalid if we cant find it

* update friendly name

* Update functions.php

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/ISSUE_TEMPLATE/agents/mysql-mariadb.agent.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/ISSUE_TEMPLATE/copilot-instructions.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* update the host validation logic

Dont just mark the device as invalid
instead pass the  original sent hostname/ip and log  that it could not be resolved

* Update to Hostname resolution logic

1.) Provide a way to disable dns resolution if your hosts are not in DNS
2.) Prefix an invalid hostname with unresolved-original_hostname for better traceability

* Group host discovery options together

* Allow for no DNS option to be disabled

Allow for the check against cacti to continue

* Fix  logic issue when dns  lookup is disabled

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Currently translated at 10.6% (41 of 385 strings)

Co-authored-by: sucharlie <su.charlie@gmail.com>
Translate-URL: https://translate.cacti.net/projects/cacti/syslog/zh_Hant/
Translation: Cacti/syslog
Updated by "Squash Git commits" hook in Weblate.

Translation: Cacti/syslog
Translate-URL: https://translate.cacti.net/projects/cacti/syslog/
* agents

* Update copilot-instructions.md

* correct filename spelling

* Move agents folder to proper place

* add gha

* Update codeql.yml

* rename file

* Create php-lint.yml

* Update phpstan.yml

* Update php-lint.yml

* .

* .

* Update install-syslog-cacti.yml

* Update populate_syslog_incoming.sh

* .

* Update install-syslog-cacti.yml

* rename file prepare for PR

* Update populate_syslog_incoming.sh

* add removal and alert rules

* add output for tracing

* Update plugin-ci-workflow.yml

* Update plugin-ci-workflow.yml

* Update plugin-ci-workflow.yml

* Update agent tools

* Triage Agent

* move instructions file to the proper place

* Rename triage_agent.md.agent.md to triage_agent.agent.md

* Update .github/agents/mysql-mariadb.agent.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/agents/triage_agent.agent.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/agents/triage_agent.agent.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/agents/triage_agent.agent.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: TheWitness <thewitness@cacti.net>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Currently translated at 100.0% (385 of 385 strings)

Co-authored-by: Daniel Nylander <daniel@danielnylander.se>
Translate-URL: https://translate.cacti.net/projects/cacti/syslog/sv/
Translation: Cacti/syslog
)

* fix: persist custom date filter across syslog page navigation

When a user sets a custom date range and then navigates to the next
page, the shift_span detection runs before validate_store_request_vars
restores session values. shift_span was false (no date params in the
page link), causing set_shift_span() to fall into the 'span' branch,
which recalculated dates from predefined_timespan and killed the
session date vars -- wiping the custom filter.

Two-part fix:
- In the 'custom' case, save date1/date2 to session (same pattern
  the existing 'shift' case already uses) so page navigation can
  find them.
- Distinguish page navigation with saved custom dates (shift_span
  false + session dates present) from an explicit predefined-timespan
  selection. Only recalculate from predefined_timespan when no custom
  dates are in session.

Fixes Cacti#250
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* fix: guard session date keys with isset before access in set_shift_span

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

* fix: guard both _date1 and _date2 session keys in set_shift_span

If _date1 exists but _date2 is absent (partial session state), the old
check passed the guard and entered the pagination-restore path. The
inner isset() at line 800 already fell back safely, but the outer guard
now explicitly requires both keys to avoid confusing partial-session
scenarios.

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

* chore: add CHANGELOG entry for develop

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

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Copilot AI review requested due to automatic review settings March 12, 2026 00:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Consolidated backport that hardens the Syslog plugin and rolls in multiple bugfixes, with additional tooling/docs updates to support newer Cacti/PHP environments.

Changes:

  • Added/updated localization assets and helper scripts for gettext generation.
  • Refactored/consolidated frontend JS into js/functions.js, and expanded DB wrapper utilities.
  • Added CI workflow + test data population script, plus documentation/versioning updates.

Reviewed changes

Copilot reviewed 38 out of 95 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
locales/po/es-ES.po Adds Spanish (es_ES) translation catalog for Syslog UI strings
locales/po/ar-SA.po Adds Arabic (ar_SA) translation catalog for Syslog UI strings
locales/index.php Adds header block + normalizes redirect header quoting
locales/build_gettext.sh Adds gettext build/merge/compile helper script
locales/LC_MESSAGES/index.php Adds header block + normalizes redirect header quoting
js/functions.js Centralizes Syslog plugin JS previously inlined in PHP
index.php Adds header block; normalizes redirect
images/index.php Adds header block + normalizes redirect header quoting
database.php Expands/modernizes syslog DB wrapper API incl. prepared helpers and utility methods
contrib/snmptt-syslog-connector.py Adds a contrib SNMPTT → syslog_incoming connector script
config_local.php.dist Adds local syslog config template (incl. ssl/retries/install options)
config.php.dist Extends DB config options (retries/SSL) + updates incoming field mappings
README.md Major doc refresh: features, install notes, rsyslog examples, DB notes
LICENSE Updates GPL text formatting/address (but currently contains conflict markers)
INFO Updates plugin metadata (version/compat/capabilities)
CHANGELOG.md Adds a standalone changelog capturing issues/features across versions
.mdlrc Adds markdownlint configuration
.mdl_style.rb Adds markdownlint style customizations
.github/workflows/populate_syslog_incoming.sh Adds script to insert test syslog/rules data for CI
.github/workflows/plugin-ci-workflow.yml Adds GitHub Actions workflow to run integration checks against Cacti + Syslog
.github/copilot-instructions.md Adds repository-specific Copilot guidance for Syslog plugin development
.github/agents/triage_agent.md.agent.md Adds agent definition doc for triage workflow
.github/agents/triage_agent.agent.md Adds triage agent definition (duplicate/alternate)
.github/agents/php-developer.agent.md Adds PHP developer agent definition
.github/agents/mysql-mariadb.agent.md Adds MySQL/MariaDB DBA agent definition
.github/agents/code-quality.agent.md Adds code-quality agent definition
.github/ISSUE_TEMPLATE/feature_request.md Adds feature request issue template
.github/ISSUE_TEMPLATE/bug_report.md Adds bug report issue template
.github/ISSUE_TEMPLATE/agents/php-developer.agent.md Adds agent template copy for PHP developer
.github/ISSUE_TEMPLATE/agents/mysql-mariadb.agent.md Adds agent template copy for MySQL/MariaDB
.github/ISSUE_TEMPLATE/agents/code-quality.agent.md Adds agent template copy for code quality

You can also share your feedback on Copilot code review. Take the survey.

LICENSE Outdated
Comment on lines +280 to +283
<<<<<<< Updated upstream
=======
END OF TERMS AND CONDITIONS

>>>>>>> Stashed changes
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The LICENSE file contains unresolved git merge conflict markers, which makes the license text invalid/distributable. Resolve the conflict and remove the markers so the file contains only the intended GPLv2 license text.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

database.php Outdated
Comment on lines 173 to 179
* @param $syslog_cnn - the connection object to connect to
*
* @return the id of the last auto incriment row that was created
*/
function syslog_db_fetch_insert_id() {
global $syslog_cnn;
return db_fetch_insert_id($syslog_cnn);
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes syslog_db_fetch_insert_id from taking a $syslog_cnn argument to taking none. In PHP 8+, existing call sites that still pass an argument will throw ArgumentCountError. To preserve backward compatibility, accept an optional parameter (or variadic) and fall back to global $syslog_cnn when not provided.

Suggested change
* @param $syslog_cnn - the connection object to connect to
*
* @return the id of the last auto incriment row that was created
*/
function syslog_db_fetch_insert_id() {
global $syslog_cnn;
return db_fetch_insert_id($syslog_cnn);
* @param object|null $syslog_cnn - (optional) the connection object to use; falls back to global $syslog_cnn when null
*
* @return the id of the last auto incriment row that was created
*/
function syslog_db_fetch_insert_id($syslog_cnn = null) {
if ($syslog_cnn === null) {
global $syslog_cnn;
}
return db_fetch_insert_id($syslog_cnn);

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed -- added optional param with null default.

js/functions.js Outdated
* Clear filter for statistics view
*/
function clearFilterStats() {
strURL = 'syslog.php?tab=stats&clear=1&header=false';
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strURL is assigned without var/let/const, which creates/overwrites a global and can cause hard-to-trace collisions between functions. Declare it locally (e.g., var strURL = ...) to match the rest of the file.

Suggested change
strURL = 'syslog.php?tab=stats&clear=1&header=false';
var strURL = 'syslog.php?tab=stats&clear=1&header=false';

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

js/functions.js Outdated
$(this).multiselect('widget').find(':checkbox:first').each(function() {
$(this).prop('checked', true);
});
$('#test').trigger('keyup');
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$('#test').trigger('keyup') appears to reference an element id that is not created anywhere in this module (the search input is created as id=\"term\"). As written, this will be a no-op and likely breaks the intended refresh/search behavior. Trigger the event on the actual input that drives host filtering (e.g., the created #term element) or remove this line if no longer needed.

Suggested change
$('#test').trigger('keyup');
$('#term').trigger('keyup');

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

js/functions.js Outdated
if (checked > 0) {
$(this).multiselect('widget').find(':checkbox:first').each(function() {
$(this).click();
$(this).prop('disable', true);
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.prop('disable', true) is not a valid way to disable inputs; the correct property is disabled. As-is, this will not actually prevent interaction and can leave the multiselect in an inconsistent state.

Suggested change
$(this).prop('disable', true);
$(this).prop('disabled', true);

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

README.md Outdated
to

If you are upgrading to 2.0 from a prior install, you must first uninstall syslog and insure both the syslog, syslog_removal, and syslog_incoming tables are removed, and recreated at install time.
``console
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fenced code block is malformed ( ``console instead of ```console), which breaks Markdown rendering for this section. Update it to a proper fenced block so the example displays correctly.

Suggested change
``console
```console

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.


header("Location:../index.php");
header('Location:../index.php');

Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After sending a Location header, it’s best practice to terminate the script (exit;) to prevent any further output/side effects (especially if additional code is ever added later). Consider adding exit; after the redirect.

Suggested change
exit;

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.


#: functions.php:72
msgid "Save Failed. Remote Data Collectors in Sync Mode are not allowed to Save Rules. Save from the Main Cacti Server instead."
msgstr "Error al guardar. Los recopiladores de datos remotos en modo de sincronización no pueden guardar reglas. En su lugar, guarde desde el servidor principal de Cactus."
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct the product name in the Spanish translation from 'Cactus' to 'Cacti' to match the project name.

Suggested change
msgstr "Error al guardar. Los recopiladores de datos remotos en modo de sincronización no pueden guardar reglas. En su lugar, guarde desde el servidor principal de Cactus."
msgstr "Error al guardar. Los recopiladores de datos remotos en modo de sincronización no pueden guardar reglas. En su lugar, guarde desde el servidor principal de Cacti."

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.


#: syslog.php:1633 syslog.php:1699
msgid "Debug"
msgstr "Depuraración"
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct Spanish typo: 'Depuraración' → 'Depuración'.

Suggested change
msgstr "Depuraración"
msgstr "Depuración"

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

[info]
name = syslog
version = 2.1
version = 4.2
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description says this is a backport of security/bugfix PRs, but the changes include a version bump to 4.2 (and the added changelog includes multiple new features). If this PR is intended to be a pure stable backport, consider separating version/feature additions into a different PR or updating the PR description to reflect the scope.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acknowledged -- this is intentionally a combined backport+version bump to align with the 4.2 release.

@somethingwithproof somethingwithproof force-pushed the backport/main-hardening-v2 branch 3 times, most recently from 2b8d746 to a482d04 Compare March 12, 2026 00:41
# Conflicts:
#	.github/workflows/plugin-ci-workflow.yml
#	CHANGELOG.md
#	functions.php
#	js/functions.js
#	setup.php
#	syslog.php
#	syslog_removal.php
#	syslog_reports.php
- LICENSE: remove stale conflict markers
- database.php: restore backward-compat optional param on syslog_db_fetch_insert_id
- js/functions.js: fix missing var declaration, #test->#term, prop('disabled'), remove empty .each()
- CI workflow: authenticate MySQL healthcheck, remove password echo
- populate script: INSERT -> REPLACE INTO for idempotent reruns
- README.md: fix malformed code fence
- locales: add exit after redirect, fix sed -i for macOS compat
- es-ES.po: fix 'Cactus' -> 'Cacti', 'Depuraración' -> 'Depuración'

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
@somethingwithproof somethingwithproof force-pushed the backport/main-hardening-v2 branch from a482d04 to bf55698 Compare March 16, 2026 16:43
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.