Skip to content

Commit

Permalink
Fixing #5194 - CSRF Read/Write
Browse files Browse the repository at this point in the history
CSRF directory needs to be writeable for creating the csrf-secret.php file
  • Loading branch information
TheWitness committed Feb 5, 2023
1 parent 56d80fe commit f5a54a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Cacti CHANGELOG
-issue#5187: Getting SQL errors in the Cacti due to plugin calling register function in wrong location
-issue#5188: Device Template Filter broken
-issue#5190: When using Gradient Support GPRINT Text Format is misaligned
-issue#5194: CSRF directory needs to be writeable for creating the csrf-secret.php file
-issue#5195: Spikekill Backtrace Argument #1 ($string) must be passed by reference, value given
-issue#5196: Gradient support breaks certain Graphs with special characters in them
-issue#5197: Realtime graph on remote poller not working in 1.2.23
Expand Down
6 changes: 6 additions & 0 deletions lib/installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,12 @@ private function getPermissions() {
$config['base_path'] . '/scripts',
);

if (isset($config['path_csrf_secret'])) {
$install_paths[] = $config['path_csrf_secret'];

This comment has been minimized.

Copy link
@netniV

netniV Feb 6, 2023

Member

Since it is a path, should the filename be fixed?

This comment has been minimized.

Copy link
@TheWitness

TheWitness Feb 12, 2023

Author Member

I think in 1.3, we take a different approach, Linux vs. Windows. In Linux on new installs anyway, we put all important stuff in /etc/cacti and upgrade's we simply use the legacy paths.

On Windows, maybe we put important stuff in C:\ProgramData\Cacti.

} else {
$install_paths[] = $config['base_path'] . '/include/vendor/csrf/csrf-secret.php';
}

$always_paths = array(
sys_get_temp_dir(),
$config['base_path'] . '/log',
Expand Down

0 comments on commit f5a54a2

Please sign in to comment.