189 Commits
Author SHA1 Message Date
TheWitnessandci 9facd9b500 security: batch 7 develop - consolidate remaining develop-only GHSA advisories (12 fixes + 8 confirmations) (#8149)
* security: batch 7 develop - consolidate remaining develop-only GHSA advisories (12 fixes + 8 regression confirmations)

Fixes: f7jw (automation preview XSS), rp5g (db_column_exists LIKE), vx2m (automation pivot CASE WHEN), h5wg (plugin DDL identifiers), 929h (aggregate LIKE filter), mfw8 (add_graphs REGEXP), m49v (user_admin sort_column allowlist), mpfm (rrd error-image theme allowlist), m3fh (SNMPv3 control chars), cg45 (remember-me row revoke), xq26 (remember-me retention window), m67r (import xml_path containment).

Confirmed already fixed on develop, pinned with regression tests: 4gph, 977w, mgcq, 5p79, cfhh, wfcf, pjq5, wp33.

Excluded: 227p (1.2.x-only), mx5c (maintainer private branch).

* security: address batch-7 review feedback (lexical-first xml_path containment, session-wide sort allowlist, connection-aware db_column_exists quoting, reject-not-normalize plugin DDL identifiers, behavior-based test names)

* style: apply php-cs-fixer single-quote fix to api_automation pivot builders; add WSL dev-environment note to copilot instructions

* fix phpstan string typing

* test: refresh SQL interpolation baseline for db_column_exists db_qstr change (database.php 9->8)

---------

Co-authored-by: ci <ci@local>
2026-10-02 15:27:34 -04:00
TheWitness e66a324d1a security: validate local_graph_id before the aggregate graph item sequence query (GHSA-6mjm-5vwr-3fr2) (#8099)
* security: validate local_graph_id before the aggregate graph item sequence query (GHSA-6mjm-5vwr-3fr2)

* security: bind local_graph_id via array filter and add regression test (GHSA-6mjm-5vwr-3fr2)
2026-09-29 00:08:17 -04:00
TheWitness 28aba6667e Resolving issue #8063: Support searching by graph ID on Graphs and Aggregate Graphs pages (#8067)
* Resolving issue #8063: Support searching by graph ID on Graphs and Aggregate Graphs pages

* Restrict graph-ID matching to all-digit search values to avoid MySQL leading-digit coercion

* Fix PHP CS Fixer coding-standards violations flagged by CI
2026-09-24 10:21:24 -04:00
Thomas VincentandTheWitness d3d99bb08a test(cdef): enforce resolver coverage (#7974)
* test(cdef): enforce resolver coverage

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

* ci(cdef): pin cache action correctly

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

* test: isolate CDEF coverage bootstrap

* fix(cdef): fail closed on invalid recursive definitions

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

* fix(cdef): log corrupt resolver records

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

* fix(cdef): bound and isolate recursive resolution

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

* fix(cdef): preserve resolver failure state

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

* fix(cdef): isolate invalid graph expressions

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

* fix(cdef): abort unsafe consumer operations

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

* fix(cdef): close consumer failure paths

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

* fix(cdef): make aggregate updates atomic

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

* fix(cdef): keep repair queries auditable

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

* fix(cdef): bind bulk deletes and escape item types

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

* fix(cdef): guard corrupt types and repair reporting

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

* fix(aggregate): propagate push-out failures

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

* fix(aggregate): document mutable message checks

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

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Co-authored-by: TheWitness <thewitness@cacti.net>
2026-09-23 13:38:51 -04:00
Thomas Vincent 08c02d3322 security: resolve open code scanning alerts (#8003)
* security: resolve open code scanning alerts

* test(security): constrain SQL helper sanitizer

* fix(security): address follow-up review
2026-09-06 08:41:47 -07:00
Thomas Vincent 95060c49ba Close test-suite discovery and coverage gaps (#7970) 2026-09-05 18:38:42 -07:00
Thomas VincentandTheWitness aa93dc247d fix(aggregate): restore item-override saves and bulk-action input names (#7338)
* fix(aggregate): restore item-override saves and bulk-action input names

The form_save() gate dropped save_component_item during the develop
refactor, so item-override saves redirected away unsaved, and the
migrate/combine confirmation dialogs posted their input as
title_format while the handlers read aggregate_template_id and
aggregate_name.

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

* test: relax aggregate form-wiring regex assertions

Match the gate and extra-array checks without pinning term order or sub-array key position.

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

* fix(aggregate): surface error when aggregate template is missing

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

* test(aggregate): catch title_format extra input in any key position

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

* test: add space before return-type colon

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

* fix(aggregate): validate request input on convert and combine paths

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

* ci: refresh security baselines

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

* test(aggregate): verify convert-template guard writes nothing on bad template

tests/Unit/AggregateFormFieldNamesTest.php only regex-matches the guard
clause in source; this runs api_aggregate_convert_template() against a
real sqlite-backed connection and confirms a missing/unmatched
aggregate_template_id leaves aggregate_graphs and aggregate_graphs_items
untouched.

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

* ci(hardening): allow test-fixture superglobal writes in aggregate guard test

tests/integration/AggregateConvertTemplateGuardIntegrationTest.php sets
$_REQUEST directly to simulate request state before calling the real
api_aggregate_convert_template(), which reads aggregate_template_id via
gnrv(). Same pattern already used in tests/HandOff/CactiDispatchHandOffTest.php
and tests/HandOff/CactiSettingsHandOffTest.php.

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

* test(aggregate): restore db globals after convert-template guard test

issue7338_wire_default_connection() overwrote $database_hostname/
$database_port/$database_default and added a fake PDO to
$database_sessions without ever resetting them, so any later test in the
same Pest process that hit a db_* helper resolved against the stale
sqlite handle instead of its own fixture -- which crashed the whole
suite before the HandOff tests ran.

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

* Change function to retrieve aggregate template ID

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Co-authored-by: TheWitness <thewitness@cacti.net>
2026-08-05 10:30:04 -04:00
Thomas Vincent 2d623c66f8 Parameterise and harden aggregate_graphs.php (#7261)
* security(aggregate): parameterise form_actions and purge_old_graphs IN() lists

The template-migration queries in form_actions() and the purge_old_graphs()
DELETE queries built IN() lists with implode(','); they now use db_*_prepared()
with placeholder arrays. aggregate_items() rfilter and aggregate_graph_id
parameterisation already landed on develop via the #7254/#7260 filter refactor,
so this keeps only the remaining unique fixes plus the gfrv()/rawurlencode() URL
hardening.

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

* test: use whitespace-tolerant regex for grv/gfrv assertion

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

* test(security): verify purge_old_graphs' parameterized deletes against real SQL

tests/Unit/InClausePlaceholderTest.php only checks the placeholder-count
arithmetic; it never runs a prepared statement, so it can't catch a
mismatched id list feeding the wrong query. This extracts the real
purge_old_graphs() from aggregate_graphs.php and runs it against a
sqlite-backed connection across five joined tables.

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

* ci: refresh SQL interpolation ratchet baseline for aggregate_graphs parameterization

Rebasing onto develop pulled in prior parameterization work (#7262,
with; aggregate_graphs.php now drops out entirely after this branch's
own db_* parameterization.

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

* test(aggregate): restore db globals after purge_old_graphs integration test

issue7261_wire_default_connection() overwrote $database_hostname/
$database_port/$database_default and added a fake PDO to
$database_sessions without ever resetting them, so any later test in the
same Pest process that hit a db_* helper resolved against the stale
sqlite handle instead of its own fixture -- which crashed the whole
suite before the HandOff tests ran.

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

* docs: add changelog entry

* docs: fix changelog entry format

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
2026-08-05 08:59:29 -04:00
983cb96439 hardening(aggregate): centralize items filter state (#7254)
* hardening(aggregate): centralize items filter state

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

* hardening(aggregate): bind item regex filter

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

* fix(style): normalize aggregate filter assignment

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

* test(aggregate): avoid full bootstrap in filter test

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

* fix: HTML-escape aggregate items rfilter attribute

Prevents attribute breakout when the search box echoes request text.

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

* refactor(aggregate): render items filter via CactiTableFilter, drop bespoke value object

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

* hardening(aggregate): use db_in_clause for item ids, restrict matching filter

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

* hardening(aggregate): match regex branch on validate_is_regex === true

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

* Apply suggestions from code review

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

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Co-authored-by: TheWitness <thewitness@cacti.net>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-24 19:46:42 -04:00
Thomas VincentandTheWitness da9d7e77e1 hardening(forms): render input attributes safely (#7253)
* hardening(forms): render input attributes safely

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

* hardening(import): keep package selections server side

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

* fix(forms): address attribute review feedback

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

* style package import state token

* style(test): use line comments so pre-commit php-cs-fixer passes

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

* fix(package): bind import parameters to stored state token

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

* ci: refresh sink and hotspot baselines for line shifts

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

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Co-authored-by: TheWitness <thewitness@cacti.net>
2026-07-24 19:31:32 -04:00
TheWitness 2bfa84e72c chore: Fix php-stan errors with new release and remove phpmailer and other removed dependencies (#7317)
* chore: Fix php-stan errors with new release

* fix: Comment this out till we have a project to update all files
2026-07-15 16:49:24 -04:00
TheWitness be4bea862f Fixing Tree Automation CVE and update CHANGELOG (#7095)
* qa: Moving actions to v6

* security: CVE In tree rules interface (#7086)

* fix: PHP-CS-Fixer issues

* fix: PHPStan Checks

* fix: PHPStan Checks

* fix: Automation checks

* fix: Walk all pages issues

* fix: Walk all pages issues

* fix: PHPStan issue
2026-05-12 13:51:15 -04:00
Thomas VincentandTheWitness 9ffa84e431 fix: clear eleven PHPStan Level 6 errors blocking develop CI (#7138)
* fix: clear eleven PHPStan Level 6 errors blocking develop CI

Four form_save() branches (aggregate_graphs, color_templates, graph_templates,
graphs) consumed empty($X_template_item_id) in the error-redirect URL while
the variable was only assigned inside a foreach + !is_error_message branch.
Initialise to 0 at the top of the save_component_item branch so the redirect
fallback to gnrv()/gfrv() is reachable on the static-analysis path too.

lib/html.php right-tab block had isset($tab['image']) guards that PHPStan
flagged as dead. The $tabs_right constructor sets 'image' on every entry,
so drop the isset() and keep only the != '' check.

Closes #7137

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

* test(mutation): pin Level 6 fixes against init removal and isset reintroduction

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

* test(smoke): cheap structural smoke for #7137 PHPStan baseline fixes

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

* test: drop Pest-incompatible 2nd-arg messages from expect() chains

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

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Co-authored-by: TheWitness <thewitness@cacti.net>
2026-05-12 13:20:11 -04:00
TheWitnessandCopilot 2810342f65 fix: Simplify redirect handling in Cacti and Fix Multi-Sort (#6955) (#6978)
* fix: Simplify redirect handling in Cacti and Fix Multi-Sort (#6955)

* fix: Simplify redirect handling in Cacti

* fix: Slight improvements from Copilot review

* fix: Fix for compatibility

* fix: Fix small syntax error

* fix: Remove comments

* fix: Make the query case insensitive

* fix: Encode the reference url

* fix: More copilot review comments

* fix: More copilot comments

* fix: Double semicolon

* fix: Missed one commit

* fix: Encode the correct url

* Update lib/html_utility.php

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

* fix: Add additional checks

* fix: Fix order string updates for multiple sort

* fix: Add a sanitization function and do further checks

* fix:Switch to local variables

---------

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

* Refactor authentication method check in auth.php

* Fix HTML encoding in goBack variable assignment

* Change get_order_string_page parameter to false

* Apply suggestion from @Copilot

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

* Fix error message capitalization for aggregate graph

* Apply suggestion from @Copilot

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

* Apply suggestion from @Copilot

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

* Apply suggestion from @Copilot

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

* Fix goBack link formatting in permission_denied.php

* Update lib/html_utility.php

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

* Add type hints to sanitize_uri and validation functions

* Fix comment formatting in validate_redirect_url

* Fix header location formatting in auth.php

* fix: Fixing PSR Issues with remote agent

* fix: Additional psr comments

* fix: More psr comments

* fix: PHPStan Issues

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-05 10:56:17 -04:00
3e1dc3c886 fix: replace strtolower/strtoupper with locale-independent wrappers (#6717)
* cleanup: remove unreachable defensive error logs in aggregate graph item validation

* fix: replace strtolower/strtoupper with locale-independent wrappers

PHP 8.5 deprecates locale-sensitive strtolower() and strtoupper().
Add cacti_strtolower() and cacti_strtoupper() wrappers that use
mb_strtolower/mb_strtoupper with explicit UTF-8 encoding, then
replace all 185 call sites across 65 files.

Existing mb_strtolower() calls (email normalization) are left as-is
since they already specify encoding explicitly.

Includes 18 Pest tests covering ASCII, UTF-8, protocol names, config
values, hex strings, NaN detection, and file extension patterns.

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

* fix: correct docblock references and month_shift() strpos check

Fix docblocks to reference strtolower()/strtoupper() (the deprecated
PHP builtins) instead of the wrapper names. Fix month_shift() to use
strpos() !== false instead of > 0 so 'month' at position 0 is matched.

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

* chore: drop unrelated lib/api_aggregate changes

Keep PR scope focused on the issue for this branch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: TheWitness <thewitness@cacti.net>
2026-03-05 19:51:02 -05:00
TheWitness 27919c50d7 Updating Copyrights to 2026 (#6578) 2026-01-28 16:11:10 -05:00
TheWitnessandCopilot b993471579 Fix #6539 - Allow Standard Cacti Log Files to be Rotated on Demand,PHPdoc, and Typing (#6540)
* Fix #6539 - Allow Standard Cacti Log Files to be Rotated on Demand from the Cacti UI

* QA: php-cs-fixer updates and documentation for lib/database.php

* QA: Update .gitignore for composer files

* QA: Update .gitignore for composer files

* QA: Back off .gitignore change its duplicated

* QA: Fix typing of db_has_permissions

* QA: Fixing typing issue in db_format_index_create

* Update lib/clog_webapi.php

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

* QA: Fix additional code issues

* QA: Applying more defaults to add device

* QA: Fix at the database layer

* QA: Fixes based upon automated testing

* QA: Fix at the database layer

* QA: After new SQL checking

* QA: Skip MacTrack oui database download warnings

* QA: Fixing type issue

* QA: Recommendation from Copilot

* QA: Recommendation from Copilot

* QA: Recommendation from Copilot

* QA: Recommendation from Copilot

* QA: Some minor changes to avoid errors in testing

* QA: Unused variable

* QA: Recommendation from Copilot

* QA: Recommendation from Copilot

* QA: Recommendation from Copilot

* QA: Minor introduced code defect

* QA: Adding some unifying space around concatination

* QA: Consistent comments and new function alias'

* QA: Multi-line comment corrections

* QA: Fix SQL Style

* QA: Missed one function alias

* QA: PHPStan Level 2 and PHPDoc fixes

* QA: PHPStan Level 2 and PHPDoc Fixes

* QA: PHPStan Level 6 Fixes

* QA: Fix lib/xml.php to PHPStan Level 6

* QA: Wrong grep -v

* PHPStan Level 6 for lib/vdef.php

* PHPStan Level 8 for lib/time.php

* QA: Raise PHPStan to Level 6 for lib/database.php

* QA: Remove @deprecated tag from grv()

* QA: Switch to htmle() alias over html_escape()

* QA: More addressing PHPStan issues at Level 6

* QA: Change recommended by Copilot for Readability

* QA: More PHPStan fixes

* QA: More PHPStan fixes

* QA: More PHPStan fixes for lib/utility.php

* QA: More PHPStan fixes at Level 6

* QA: Raise PHPStan to Level 6 More Functions

* QA: Raise PHPStan to Level 6 More Functions

* QA: Raise PHPStan to Level 6 More Functions

* QA: Raise PHPStan to Level 6 More Functions

* QA: Raise PHPStan to Level 6 More Functions

* QA: More PHPStan fixes at Level 6

* QA: Raise PHPStan to Level 6 More Functions

* QA: Raise PHPStan to Level 6 More Functions

* QA: More PHPStan fixes at Level 6

* QA: More PHPStan fixes at Level 6

* QA: Raise PHPStan to Level 6 More Functions

* QA: Raise PHPStan to Level 6 More Functions

* QA: More PHPStan fixes at Level 6

* QA: Raise PHPStan to Level 6 More Functions

* QA: Raise PHPStan to Level 6 More Functions

* QA: More PHPStan fixes at Level 6

* QA: Raise PHPStan to Level 6 More Functions

* QA: Raise PHPStan to Level 6 More Functions

* QA: More PHPStan fixes at Level 6

* QA: More PHPStan fixes at Level 6

* QA: More PHPStan fixes at Level 6

* QA: Raise PHPStan to Level 6 More Functions

* QA: More PHPStan fixes at Level 6

* QA: Some phpseclib3 fixups to update to latest

* QA: More fixups for graphing for magic strings

* QA: More PHPStan fixes at Level 6

* QA: Fixing order string type on get_allowed_graphs()

* QA: Fixing improper use of print

* QA: Optimization of color_templates

* QA: Copilot recommendation

* QA: Copilot recommendation

* QA: Copilot recommendation

* QA: Copilot recommendation

* QA: Copilot recommendation

* QA: Copilot recommendation

* QA: Copilot recommendation

* QA: Copilot recommendation

* QA: Raise PHPStan to Level 6 More Functions

* QA: Issues insalling Cacti

* QA: Issues insalling Cacti

* QA: Issues insalling Cacti

* QA: Issues insalling Cacti

* QA: Issues insalling Cacti

* QA: Issues testing Cacti

* QA: Copilot recommendation

* QA: More PHPStan fixes at Level 6

* QA: More PHPStan fixes at Level 6

* QA: More PHPStan fixes at Level 6

* QA: More PHPStan fixes at Level 6

* QA: More PHPStan fixes at Level 6

* QA: Installer failing

* Undo ownership changes to remove tar errors

* QA: Updates after php-cs-fixer

* QA: Adding code checks to syntax checking

* QA Change syntax flow language

* QA: Reduce the number of cures

* QA: Use sequentional option

* Change runner to self-hosted for check job

* Fix typo in OS version in workflow file

* Add Git installation step in workflow

Added step to install Git if not already installed.

* Add '-y' flag to apt-get install and update commands

Updated apt-get commands to include '-y' for automatic confirmation.

* Change workflow OS version to 'ubuntu-latest'

Updated the workflow to use 'ubuntu-latest' instead of 'ubuntu:latest' and modified the 'runs-on' configuration.

* Remove sequential option from phpcsfixer script

* Remove PHPCS fixer step from workflow

Removed PHP coding standards check from workflow.

* Move code checks to before plugins

Moving these core checks to before the plugins are installed as we really want to check only the base Cacti here.

* Add Composer validation and caching to start of workflow

* QA: Addressing PHPStan additional

* QA: Restore composer lock file

* QA: Addressing PHPStan additional

* QA: Addressing PHPStan additional

* QA: Complete LDAP Project

* QA: php-cs-fixer doing it's thing

* QA: Syntax is already happening in PHPStan

* QA: The md5 function no longer exists

* QA: Update after ldap changes

* QA: Undo that last password hack

* QA: Attempting to switch to MariaDB 11.8

* QA: Attempting to switch to MariaDB 11.8

* QA: Resolving some issues with PHP8.4

* QA: Resolving some issues with PHP8.4

* QA: Add PHP8.5 to the matrix

* QA: Removing PHP8.5 due to dependency issues

* QA: Add the DB version to the testing output

* QA: Switch back to MySQL for the moment

* QA: More fidelity in reporting

* QA: The pipe must be mixed

* QA: Moving audit_schema.php changes from 1.2.x

* QA: Moving audit_schema.php changes from 1.2.x

* QA: Restore mysql monitoring

* QA: php-cs-fixer issues

* QA: Attempt to roll back to MariaDB 10.6

* QA: Attempt to fix check_all_pages.sh

* QA: Make installer functional again

* QA: Fix installer php-cs-fixer issues

* QA: Type to a string

* QA: Get the database version correctly

* QA: Fix issue with reports in check_all_pages.sh

* QA: Check the server version in the right place

* Feature: Support SHA256 as a new hash for passwords

* QA: Function definition and return typing audit

* QA: Refinement of form types

* QA: Refinement of form types

* QA: Consistency of comments

* QA: Issues with php-cs-fixer and more comments

* QA: More typing issues

* QA: php-cs-fixer on merge conflict resolution

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-25 10:13:56 -05:00
TheWitness 5423e8318d QA: Fixing additional files at phpstan level 1 2025-11-18 22:49:19 -05:00
Jimmy Conner f37017e3e9 Better fix for undefined var in aggregate_graphs 2025-11-18 21:30:23 -06:00
TheWitness 58301865e1 QA: Fixing aggregate_graphs.php at phpstan level 1 2025-11-18 22:10:56 -05:00
TheWitness b9334a15d9 QA: Updates for files for php-cs-fixer and some php-doc changes 2025-11-18 21:01:15 -05:00
TheWitness 9ea7e73c2a QA: Convert from input to buttons 2025-07-13 12:30:30 -04:00
TheWitness ac0c1c5c45 Switch from include to require 2025-04-03 14:37:02 -04:00
TheWitness 685d4b9357 Start addressing PHPStan Issues 2025-03-23 14:09:11 -04:00
TheWitness e5c4015e0e QA: Remove most references to $config
This removes most entries to $config in the base code.  A few new constants were defined to achieve this:

* CACTI_CONNECTION - The status of the current connection
* CACTI_CSRF_SECRET - The path to the csrf secret file
* CACTI_PHP_SNMP - True if php-snmp is installed
* CACTI_WHITELIST - The path to the Cacti Whitelist file if defined

I also moved several $config['poller_id'] to the existing POLLER_ID and move a number of $config['is_web'] to the existing CACTI_WEB constants.

There remain a few artifacts in the code.  They will be handled in a separate commit.
2025-03-22 16:48:59 -04:00
TheWitness 2c779273f9 Copyright Updates and PHP-CS-Fixer updates 2025-03-09 14:34:19 -04:00
TheWitness ea5429c03a Fixing some invalid lint updates 2025-03-09 13:11:05 -04:00
TheWitness d68942c84f QA: Remove name space collisions causing vscode issues 2025-03-08 17:54:26 -05:00
TheWitness f78678a8f5 QA: Undefined variable $tab_short_name 2025-01-13 18:03:33 -05:00
TheWitness a8a71307df QA: Audit on 'No Rows Found' and selectable_cell use
* There are many more tables to migrate.  Not enough time to do it without mistakes today.
2024-12-24 12:54:01 -05:00
TheWitness 6fad678a97 QA: Convert Aggregate Graphs to Filter Class and Prepared Statements 2024-12-20 10:28:12 -05:00
TheWitness 3bada47208 QA: Phase 1 of filter cleanup prior to migration
* Introduce a new wrapper function for showing the show/hide column indicator
* Migrate all Core packages to use that new wrapper function
* Migrate pages to have JavaScript show immediately below the form object.
* Correct some indentation issues
2024-12-16 13:01:17 -05:00
TheWitness 88f9e74d33 QA: Aggregate Preview Button Issues
* This does not manifest itself in 1.2.29
* There was also a JavaScript issue on this page
* Cleaned up some logic from earlier auto-linting issues
2024-12-04 16:44:57 -05:00
TheWitness d04f352535 QA: Remove colons 2024-12-04 15:28:11 -05:00
TheWitness 3b28f081a3 QA: Sanity check on Graph Item Removal
* Checking for possible issues with the removal of Graph Items
* Light PSR when discovered
2024-12-03 13:09:02 -05:00
Browniebraun 5c9d468671 - add data-DefaultLabel tag to all filter related select fields. 2024-09-27 22:27:08 +02:00
TheWitness 1aa72d24c9 QA: Update Copyright to 2024 2024-02-03 14:18:57 -05:00
Linegod 622244d1ba typos 2023-11-26 10:40:20 -06:00
TheWitness 8b94882911 QA: Light PSR to aggregate_graphs.php 2023-11-23 14:03:29 -05:00
TheWitness c3e68476c0 QA: Remove deprecated aggregate_items.php 2023-11-22 11:56:19 -05:00
TheWitness 78806da57a QA: Additional Fixes for #5555 2023-11-20 09:02:27 -05:00
TheWitness b1af42e748 QA: Converting Aggregate Graphs to new confirmation API 2023-11-18 22:56:54 -05:00
TheWitness 75d704edf4 QA: Remove old stub function name documentation 2023-11-12 22:09:20 -05:00
TheWitness 6dab6f5b28 QA: Additional REGEXP and RLIKE changes 2023-08-04 15:50:53 -04:00
TheWitness b0887316f2 Fixing #5305 - Consolidate color_templates and aggregate_items
Remove files aggregate_items.php and color_templates_items.php and consolidate into their parents
2023-04-16 15:35:31 -04:00
Dale Schultz f8ce3b6716 Add support for RRD --left-axis-format Option (#5280) 2023-03-26 10:16:41 -04:00
Mark Brugnoli-Vinten 32ba2f19f4 Update copyright year for 2023 2023-01-03 20:34:26 +00:00
Mark Brugnoli-Vinten 8b29d12cc9 Define cacti system paths as constants for better code checking (#5120)
This also provides a full run of src-fixer against all files to
ensure all code is now in alignment.

Closes #5120
2023-01-01 01:03:15 +00:00
Mark Brugnoli-Vinten c8157e3cbb Switch to constants for common session/cookie options 2022-12-21 10:53:53 +00:00
Mark Brugnoli-Vinten 7111414117 QA: Reduce code duplication 2022-12-11 04:24:46 +00:00