Skip to content

Commit

Permalink
Bettererer
Browse files Browse the repository at this point in the history
  • Loading branch information
murrant authored and Jellyfrog committed Dec 7, 2024
1 parent 869a637 commit a960a2b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions includes/html/pages/device/showconfig.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,7 @@

// Try Oxidized again with new hostname, if it has changed
if ($oxidized_hostname != $device['hostname']) {
$response = (new \App\ApiClients\Oxidized())->getContent('/node/show/' . $oxidized_hostname . '?format=json');
$node_info = json_decode($response, true);
$node_info = json_decode((new \App\ApiClients\Oxidized())->getContent('/node/show/' . $oxidized_hostname . '?format=json'), true);
}
}

Expand Down Expand Up @@ -304,7 +303,7 @@
echo '<br />';
print_error("We couldn't retrieve the device information from Oxidized");
if (isset($response) && preg_match('#<title>(.*)</title>#', $response, $error_matches)) {
print_error(htmlentities($error_matches[1]));
print_error(strip_tags($error_matches[1]));
}
$text = '';
}
Expand Down

0 comments on commit a960a2b

Please sign in to comment.