77 Commits
Author SHA1 Message Date
Thomas VincentandTheWitness fa050a2417 Revoke server-side auth tokens on logout (#7677)
* Revoke server-side auth tokens on logout

clear_auth_cookie() ran after cacti_cookie_logout() had already unset
$_COOKIE['cacti_remembers'], so its guard short-circuited and the
user_auth_cache row was never deleted; the timeout/disabled/remote branch
never called it at all. Move it ahead of the cookie clear so every logout
revokes the remember-me token, and have logout-everywhere also terminate the
user's other database sessions.

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

* Guard the logout test function-body offsets and reorder the changelog entry

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

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Co-authored-by: TheWitness <thewitness@cacti.net>
2026-08-16 21:22:49 -04: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 ac0c1c5c45 Switch from include to require 2025-04-03 14:37:02 -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
Linegod 7c02f88f8a typos 2024-12-23 15:01:52 -06:00
TheWitness be1b1200ce Fix: #1773 - Lock Cacti Install
* This was fixed by introducing a setting to lock the Cacti install to a single user mode from the Support > General page, and only for the primary administrator.
2024-12-22 12:30:37 -05:00
TheWitness 1aa72d24c9 QA: Update Copyright to 2024 2024-02-03 14:18:57 -05: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
TheWitness 64b48e1dcb Fixing #5103 from 1.2.x branch
When Remote Data Collector changes status a full page refresh or logout should occur
2022-12-18 15:42:49 -05:00
netniV 550b697678 Fix depreciated get_cacti_version() usage and add backtrace info 2022-11-26 22:34:28 +00:00
netniV fd44f394a0 Remove the need for header=false
Update loadPage calls to be loadUrl
Update loadPageNoHeader calls to be loadUrl calls

Also includes changes to make logout adhere to new html_auth_xxx functions
2022-11-26 13:58:49 +00:00
netniV c1314efcee Update classic theme 2022-11-25 20:00:04 +00:00
netniV 21a9ebf84a More version handling changes 2022-11-25 02:40:27 +00:00
TheWitness 82b229db9e Updating Copyright to 2022. 2022-02-06 17:16:20 -05:00
TheWitness df54a4a3f3 Updating copright years 2021-01-01 20:28:58 -05:00
TheWitness d65f40d2bf Abstract Cacti session handler 2020-03-29 19:08:29 -04:00
TheWitness 6a2d781778 Fixing Issue #3374 Cacti Cookie Domain
* Allow Setting of Cookie 'Cacti' domain edition
* This also allows the Cacti administrator to extend the content security policy to include unsafe-eval for scripts.
2020-03-24 19:12:48 -04:00
TheWitness 25abe64483 Fixing Issue #3343 and outstanding issue with #3342 2020-03-13 18:49:28 -04:00
netniV 4fa9a68fb3 Update copyright to 2020 2020-01-12 12:19:49 +00:00
cigamit 79cb15cba1 Resolving Issue #3129
After automatic logout, logout repeats periodically
2019-12-05 18:15:31 -06:00
netniV a14e57a515 Correct hooks to use RESKIN constant 2019-02-23 16:31:33 +00:00
cigamit 69dbbd2c89 Resolving Issue #2426
Various issues about hook 'custom_logout_message'
2019-02-23 10:10:35 -06:00
netniV b8c579b129 Update copyright notices for 2019 2019-01-25 08:06:11 +00:00
netniV e264cb5159 Allow logout even if upgrade requried 2019-01-19 19:05:58 +00:00
cigamit d3536ed321 Consolidation for Issue #1305
Code reduction by making all the header into a function.
2018-02-04 22:01:16 -06:00
cigamit 671fa2f736 Regression and QA on Issue #1305
Missing some files and settings.  We should really just have a common
header function to reduce the chances of variation.
2018-02-04 14:09:56 -06:00
netniV b6e18d8250 Fix for issue #1292: browser caching of javascript and css files (#1305)
* issue #1292: Fix issues with browser caching of javascript and css files

* Removing unnecessary variable set.

* Minor changes to format and syntax

Use return and not echo, minor spacing changes.
2018-02-04 11:44:45 -07:00
Tony Roman 519b35f5cd Update copyright to 2018 2018-01-06 09:10:15 -05:00
Wolfgang Stöggl 4a1a15d72c Correct spelling of RRDtool (#1038)
- Change RRDTool -> RRDtool with a lowercase t.
- Replace in all files except *.mo, *.po, *.pot
2017-10-16 11:32:05 -04:00
cigamit 927892584c Resolve JavaScript errors in logout.php 2017-08-19 14:48:31 -05:00
cigamit 1a14cbb440 Introduce new get_cacti_version function to reduce database calls on pages 2017-05-14 12:29:30 -05:00
Tony Roman 8a179d7d7f Fix up to move if elseif else blocks to PSR 2017-05-07 19:57:36 -04:00
patrick 4d5bb9facb get_selected_theme()
- result of get_selected_theme() stored in vars
2017-04-06 18:00:38 +02:00
cigamit 3c7ef42902 Resolving Issue #329
Also first step in resolving issue #186
2017-02-23 17:40:19 -06:00
browniebraun 65cd1c6da2 Merge branch 'develop' of https://github.com/Cacti/cacti into develop 2017-02-23 22:41:32 +01:00
browniebraun c76a30ffbc i18n: remove embedded HTML syntax
Signed-off-by: browniebraun <browniebraun@outlook.com>
2017-02-23 22:34:24 +01:00
cigamit 75c6359894 Resolving Issue #329 2017-02-22 20:03:17 -06:00
Tony Roman 35a5988f41 Update source code files copyright to new year 2017-01-01 13:45:29 -05:00
cigamit da27a9cb6d add font-awesome to additional pages 2016-12-21 21:08:25 -06:00
cigamit d70f9718dc resolve login redirect loops
Corner case where you have forced a password change, but have not
granted that permission to the user.  We are also now blocking the save
when the user tries to make this setting.

We need better interactions with the login screen under certain failure
modes.  But for now this is good enough.
2016-12-19 18:18:05 -06:00
cigamit 0f1f9f6bb6 Remove version from logout screen also 2016-10-26 23:09:51 -05:00
cigamit 93007bc347 add jquery-migrate to work around issues 2016-09-20 20:04:27 -05:00
cigamit a1ead0caad resolving bug#1877 2016-08-26 20:43:15 -05:00
Browniebraun bb30d8b692 i18n updates 2016-04-24 22:52:16 +02:00
Micke2k 706ccd9d8e minor fix for logout.php
added tablesorter
2016-04-02 18:31:33 +04:00
cigamit f2edfcbe53 update theme to a user setting 2016-02-14 10:48:34 -06:00
cigamit 2387bd4a08 removing many $_GET, $_REQUEST, and $_POST variable usage
There are still three steps to go in this overall.  The first is to
replace all the page filtering session storing and validation functions
and the second is to propagate those changes into various areas of the
lib directory that include the use of the various variables, lastly,
developer mode will have to be enable to see if there are any variables
used in the code that have not been sanitized.  Note, at this point the
develop branch should be thought of as slightly unstable
2016-02-07 12:51:49 -06:00