Skip to content

Commit

Permalink
Fixing #5782 - Problem with External Links
Browse files Browse the repository at this point in the history
Function file_get_contents() instead of include_once() in file link.php
  • Loading branch information
TheWitness committed Jun 29, 2024
1 parent f364ec3 commit c6c6601
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ Cacti CHANGELOG
-issue#5772: Login log message unification - add client IP adress
-issue#5773: Update rrd.php missing variable $okpos
-issue#5780: Undefined array key "default" in file html_form.php
-issue#5782: Function file_get_contents in file link.php

1.2.27
-security#GHSA-37x7-mfjv-mm7m: Authentication Bypass when using using older password hashes
Expand Down
2 changes: 1 addition & 1 deletion link.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
$file = realpath($basepath . '/' . $page['contentfile']);

if ($file !== false && substr($file, 0, strlen($basepath)) == $basepath) {
print file_get_contents($file);
include_once($file);
} else {
print '<h1>The file \'' . html_escape($page['contentfile']) . '\' does not exist!!</h1>';
}
Expand Down

0 comments on commit c6c6601

Please sign in to comment.