Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,20 @@ IMPORTANT NOTE: This version only works on CACTI 1.x++!
## Changes

--- 1.6 ---
* security#205: weathermap_group_move() uses raw SQL instead of parameterized queries
* security#216: Security: defense-in-depth audit findings
* issue#214: In weathermap v1.5, the Hover Graph’s height and width values cannot be modified.
* issue#212: $bgfile used instead of $objfile in ICON writability check in weathermap_repair_maps()
* issue#211: Warn Count is being reset too early
* issue#209: $name clobbered immediately after fetch in weathermap_map_settings_form()
* issue#208: cron field order wrong in weathermap_check_cron() — DOM/month/DOW swapped
* issue#207: liveview uses $map[0]['configfile'] on flat row from db_fetch_row_prepared()
* issue#206: dir() used instead of chdir() in viewimage/viewthumb — working directory never restored
* issue#204: weathermap_footer_links() duplicated across two files
* issue#202: Graph-Preview not working on Release 1.5 after Upgrade
* issue: Attempt to keep the plugin basepath the weathermap directory
* issue: Miscellaneous security hardening and preparation for Cacti 1.3
* issue: Restoring documentation links to editor and management pages
* feature#219: Add Via Style as a Link form Option

--- 1.5 ---
Expand Down
36 changes: 31 additions & 5 deletions lib/WeatherMap.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -688,12 +688,38 @@ function ProcessString($input, &$context, $include_notes = true, $multiline = fa
}

if (strpos($input, 'graph_image.php') !== false) {
if (strpos($input, 'graph_height') === false) {
$input .= '&graph_height=' . read_config_option('weathermap_height');
}
if ($context->my_type() == 'LINK') {
if (strpos($input, 'graph_height') === false) {
if (isset($this->links['DEFAULT']->overlibheight) && $this->links['DEFAULT']->overlibheight > 0) {
$input .= '&graph_height=' . $this->links['DEFAULT']->overlibheight;
} else {
$input .= '&graph_height=' . read_config_option('weathermap_height');
Comment thread
TheWitness marked this conversation as resolved.
}
}

if (strpos($input, 'graph_width') === false) {
if (isset($this->links['DEFAULT']->overlibwidth) && $this->links['DEFAULT']->overlibwidth > 0) {
$input .= '&graph_width=' . $this->links['DEFAULT']->overlibwidth;
} else {
$input .= '&graph_width=' . read_config_option('weathermap_width');
}
Comment on lines +691 to +705
}
Comment thread
TheWitness marked this conversation as resolved.
} elseif ($context->my_type() == 'NODE') {
if (strpos($input, 'graph_height') === false) {
if (isset($this->nodes['DEFAULT']->overlibheight) && $this->nodes['DEFAULT']->overlibheight > 0) {
$input .= '&graph_height=' . $this->nodes['DEFAULT']->overlibheight;
} else {
$input .= '&graph_height=' . read_config_option('weathermap_height');
Comment thread
TheWitness marked this conversation as resolved.
}
}

if (strpos($input, 'graph_width') === false) {
$input .= '&graph_width=' . read_config_option('weathermap_width');
if (strpos($input, 'graph_width') === false) {
if (isset($this->nodes['DEFAULT']->overlibwidth) && $this->nodes['DEFAULT']->overlibwidth > 0) {
$input .= '&graph_width=' . $this->nodes['DEFAULT']->overlibwidth;
} else {
$input .= '&graph_width=' . read_config_option('weathermap_width');
}
}
Comment thread
TheWitness marked this conversation as resolved.
}

if (strpos($input, 'graph_nolegend') === false) {
Expand Down
Loading