Commit Graph
190 Commits
Author SHA1 Message Date
TheWitness a37dbfabda Minor tweak to CSP for Issue #3808
Add image source extensions
2020-09-17 08:48:53 -04:00
TheWitness 6fe7d8d41e Fixing Issue #3808 - Alternate Sources for CSP
Allow Users to Specify Alternate Sources for Content-Security Policy
2020-09-16 19:32:31 -04:00
TheWitness aa97332b1d Fixing Issue #3639 and #3635
- Backtrace Errors attempting to run AUTOM8 to Remote Data Collector
- Duplicate Entry error when updating Device
- This missed a new option to limit device sync to single, or multiple hosts
2020-06-27 12:12:29 -04:00
TheWitness dd580967ec Undo hack related to issue #3526
Can no longer login.  This issue like exacorbated by a vain attempt to implement same-site cookies before they were officially supported in PHP 7.3.
2020-05-22 17:34:52 -04:00
TheWitness dd6c20c250 Fixing Issue #3452
New Content-Security-Policy prevents External Links from Operating
2020-04-10 11:04:32 -04:00
TheWitness abaef8fa7b More testing resulting from #3402 and possible solution to #3400
* Revised 'Content-Security-Policy' tested on FF, Chrome, Edge, Opera and no issues found.
* Adding the Multiselect Filter as it's critical for some initial page loads like the Graphs page for Templates which include the 'Search' functionality.
2020-04-05 14:51:09 -04:00
TheWitness ad2e833950 Additional testing on #3402
On a few pages, these JavaScript elements become crucial
The no-cache does not actually mean 'no-cache'.
2020-04-04 10:42:48 -04:00
TheWitness ced9f430f4 Partial resolution to low lighthouse score for performance #3402
* Cacti scores low on performance audit on lighthouse audit
* This change enables generic caching of pages, but with a very short age for RRDtool generated graphics.
* It increses the SEO score through the use of specialty tags on anchors leveraging the _blank target attribute value
* It removes and unnecessary tooltip on the document element

There may be additional changes forthcoming.  However, these changes raised the score from 0 to the mid twenties.

Some of the changes, like minification of JavaScript we do not do due to the nature of the project, but could be done by customers.  Once the page is first rendered, it's in the browsers memory and cached for a good time, so this is not a big deal.
2020-04-04 09:09:58 -04: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 f8b9483094 Minor update for PHP7 compatability
Was not working in PHP7.3 for sure.  The SameSite option was being rejected.
2020-03-22 10:31:08 -04:00
TheWitness 68831cd01e Fixing #1566
Need to change to $config due to old PHP5.
2020-03-21 14:53:17 -04:00
TheWitness 265ebc27ea Fixing Issue #1566
* Add SameSite support for cookies
* Add some light formatting for readability
2020-03-21 14:40:17 -04:00
TheWitness bb3fcabdd1 Fixing Issue #3349
Variable max_input_vars is read only.  Attempting to change it adds no value
2020-03-16 18:49:21 -04:00
TheWitness 107bfecebf Fixing Issue #3342
CSRF at Admin Email
2020-03-12 18:56:29 -04:00
TheWitness 4f0ef757c1 Fixing Issue #3336
Plugins such as mapping plugins need to relax content security policies
2020-03-09 22:12:54 -04:00
TheWitness 435bfdebce Add lib/poller.php to global include
This will reduce the likelihood of issues with various plugins.
2020-02-23 13:41:13 -05:00
netniV 3f836d97b8 Upgrade can stall when checking permissions on csrf-secret.php
Major mods to the CSRF library (which have been submitted upstream but as there's been no activity for a year,
may not get merged)

    - Installer now correctly only checks permissions if csrf-secret is set.

    - Created new csrf include to make configuration process easier to identify

    - Logging can be enabled now for CSRF to debug it
2020-02-23 02:48:43 +00:00
netniV f3f6115004 Improve program path detection by using system path and PHP_BINDIR
Closes #3184
2020-01-20 13:14:53 +00:00
TheWitness 56a04c612f Fixing Issue #3195
Add Full Content-Security-Policy to the global header.
2020-01-19 09:41:27 -05:00
cigamit 06b606b8d3 Resolving Issue #3142
* Chrome sets graphs tree navigation view to width 0px
* Also correct issues with CSP migration
2020-01-17 18:33:47 -06:00
netniV 1a61e1f0ef Fix issues when config.php is unreadable
This commit adds a notice when configphp is present but unreadable.  It also adds the ability to display any database connection errors that occur within db_connect_real for diagnostic purposes.  These notices are only presented to the end user when the appropriate flag is set as most users do not need them.

Closes #3181 and closes #3182
2020-01-12 12:22:15 +00:00
netniV 4fa9a68fb3 Update copyright to 2020 2020-01-12 12:19:49 +00:00
cigamit 0382b5b35a Relative to #3067, redirect must come sooner
This way the cookie does not set sent insecurely.
2019-11-09 10:27:54 -06:00
cigamit 591da66827 Resolving Issue #3066
This was merged into develop, but due to it being security related, we will include it in the 1.2.8
2019-11-09 08:54:23 -06:00
netniV ef271a16ef When URL_PATH is blank, it should assume that it is '/'
Closes #2908
2019-08-22 11:30:47 +00:00
cigamit 24145c5e53 Resolving Issue #2878
PHP 7.4 Function get_magic_quotes_gpc() is deprecated
2019-08-11 13:39:45 -05:00
netniV e95eb61cef When testing remote poller connections during install, undefined variable warning can occur
Closes #2860
2019-08-01 12:45:02 +00:00
netniV 900c747ffa Further resolve #2638 2019-04-28 18:57:20 +00:00
Matthew Horan 59b58671aa Support disabling PHP SNMP extension (#2638)
Re-purpose the existing php_snmp_support config value to allow
administrators to disable the built-in SNMP extension.

It can be desirable to force use of the Net-SNMP in some configurations,
particularly when IPv6 is in use. This allows the administrator to set
$php_snmp_support = false in config.php, which will then force use of
the Net-SNMP binaries tools.
2019-04-23 07:58:40 +06:00
netniV 6c7b2ab95e Missing configuration defaults prevent installations/upgrades without showing reason
Closes #2555
2019-03-23 11:04:57 +00:00
netniV 308292e2d7 Update copyright notices for 2019 2019-01-25 08:05:00 +00:00
netniV 89f0a06216 Resolving issue #2304 and #2311
This commit corrects a previous unseen issue where the PHP environment at command line level is being populated with environment variables normally only seen when called from a web server.

issue#2304: Installation progress stays at 0%
issue#2311: Unable to update PHP location during installation due to incorrect CLI environment

The new check uses the php_sapi_name() function to verify that we are indeed at 'cli' level.  All other values returned by php_sapi_name are considered non-cli including 'cli-server' which is for client/server scenarios.

Most checks have now been replaced by a single defintion ('CACTI_CLI') to define whether in CLI mode.  If a script is only to be called from CLI it must either defined 'CACTI_CLI_ONLY' or include include/cli_check.php instead of include/global.php.
2019-01-15 13:57:50 +00:00
netniV 27e7674f7b Remove and reset BETA versioning number 2019-01-03 02:10:03 +00:00
cigamit 5c8ebf0a6a Preparing Beta4 2018-11-26 05:48:31 -06:00
cigamit a309034c57 Resolving Issue #2134
[1.2.0 Beta 2] cacti log rotation should keep file ownership and
permissions
2018-11-18 11:12:00 -06:00
cigamit 06ff974c59 Readying beta3 2018-11-18 10:38:18 -06:00
cigamit 7f1ff7db5d Ready for Beta2 2018-10-21 08:42:08 -05:00
Tony Roman 4ddd5ae745 Add Support Menu Item
- Add external link support in menu (probably need more work)
 - Added Support -> Documentation menu item
 - Added Support -> Users Community menu item
 - Made documentation loading dynamic, if release documentation is
   not included it will redirect to Github documenation
2018-10-01 00:34:04 -04:00
cigamit 8d0079f406 Preparing for Beta1 2018-09-30 12:37:35 -05:00
Mark Brugnoli-Vinten 4c2bb0703d QA fixes (#1967) 2018-09-24 05:36:24 -05:00
cigamit f64784596c Fix on Issue in Remote Installer
The remote data collector installer is broken at the moment.  This patch
is needed to at least begin the install process.
2018-09-23 15:00:33 -05:00
cigamit e845fbb20c Resolving Issue #1060
- Design Enhancement for Large scale Cacti Implementations
- Spine changes still required
- Testing still required
2018-09-22 23:17:19 -05:00
Mark Brugnoli-Vinten e48f788d92 Resolving issue #1870 (#1917) 2018-09-12 20:01:18 -05:00
Mark Brugnoli-Vinten 0fb4f53809 Resolving issue #1897 (#1898)
* Resolving issue #1897

* Resolving issue #1899

* Further Resolving Issue #1899
2018-09-06 21:24:51 -05:00
cigamit 637c436182 Introduce Cacti Beta Constant
This will make it clear to users that they are running a beta version of
Cacti
2018-09-02 09:43:46 -05:00
Mark Brugnoli-Vinten 147c152eb7 Feature #1806 - Control of low level debug (#1807)
This patch adds functionality to control the debugging of low level routines
via defines within the config.php file.  In order to allow flexibility, if
these are defined, variables within the $config array are primed as true,
otherwise false.

These elements within the $config array are defined in uppercase to highlight
the difference between these are other ordinary configuration optios.

Should a function or program need to enable debugging of these various
options, simply setting the value to true in the $config array will enable
logging from that point.  Inversely, setting it to false will stop logging
from that point.

The only option that is of limited use is DEBUG_READ_CONFIG_OPTION_DB_OPEN
that will only work up to the database being open.  Setting this to true
after the database has already been opened will not automatic turn off the
companion option DEBUG_READ_CONFIG_OPTION since the db_connect_real() will
not be called again.

The list of options and their functionality are:

- DEBUG_READ_CONFIG_OPTION : record use of read_config_option()
  to cacti-option.log in the system temporary folder

- DEBUG_READ_CONFIG_OPTION_DB_OPEN : Once the database has been
  successfully opened, disable DEBUG_READ_CONFIG_OPTION

- DEBUG_SQL_CMD : Always write a copy of the SQL being requested
  to the cacti-sql.log file in the system temporary folder

- DEBUG_SQL_FLOW : Write flow of db_xxx calls to the cacti-sql.log
  in the system temporary folder.

The system temporary folder is normally set to one of the following:

- Linux, CLI: /tmp/
- Linux, WEB: Apache/Ngix's temporary folder
- Windows, CLI: %TEMP%
- Windows, WEB: Temp folder of web user or %WINDIR%\TEMP
2018-08-07 07:18:20 -05:00
Mark Brugnoli-Vinten 6e1b8431b7 Fixes for Issues 1781, 1782 and 1784 (#1785)
* Fixes for Issues 1781, 1782 and 1784

This patch corrects the following issues:

- #1782 During Install, changing the Theme from Modern to another theme has no
        effect
- #1784 During Install, changing the Language from one to another has no
        effect
- #1781 Installer does not warn when mysql optimizations not set

As part of #1781's fixes, a new warning icon is displayed instead of a thumbs
up or down.  Additionally, recommendations have been revamped so that the ones
which are optionally (and some even state can be ignored) are now optional!

Also, introduced the correct calculation for innodb instances by taking the
buffer size during a previous recommendation and calculating from that.  If
the buffer size is never found or the calcuation finds less than 1 instances
are recommended, a minimum of 1 is set.

The main reason for #1782 and #1784's issues were caused by renaming index.php
to install.php as part of the recent security update (see PR #1747).  Updated
the javascript to use the correct install.php and then removed some extra data
that was being returned outside of StepData unnecessarily.

* Further fixes

This update corrects a number of issues with the database upgrading code, adds
the 'debug' plugin from cigamit, improves database functions to be more
consistent with errors across all functions and various installer based fixes
for the display and update of database upgrades.

It also brings a more visual response to the cli/upgrade_database.php so that
end users are not left wondering if something is happening.  Also, reviewed
all upgrade scripts to ensure that an upgrade from 0.8.8 through to 1.2.0 is
possible even if a previous database upgrade have been done.

* Fix QA issue with 'path_cactilog'

Due to some code reshuffle and testing, found that the above setting was being
read via read_config_option() before there was a database open so no path was
ever detected unless the force option was used.
2018-08-05 10:43:01 -05:00
Mark Brugnoli-Vinten 2b61c1bba3 Further fix for Issue 1723 (#1728)
* Issue #1723 - die() messages should include \n for better logging

This corrects issue #1723 where die() messages appear in log files without a new line character causing logs to appear corrupted.

* Replace \n with PHP_EOF to be platform independant.
2018-07-21 15:17:14 -04:00
Mark Brugnoli-Vinten fde08a533f Issue #1723 - die() messages should include \n for better logging (#1724)
This corrects issue #1723 where die() messages appear in log files without a new line character causing logs to appear corrupted.
2018-07-21 08:31:57 -04:00