mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Security fixes XSS in oxidized-cfg-check.inc.php and print-customoid.php (#14126)
Signed-off-by: AL-KASSAR <feras.al-kassar@sap.com>
This commit is contained in:
@@ -8,6 +8,7 @@ if (isset($_POST['config'])) {
|
||||
$oxidized_cfg = Yaml::parse($_POST['config']);
|
||||
$validate_cfg = validate_oxidized_cfg($oxidized_cfg);
|
||||
foreach ($validate_cfg as $error) {
|
||||
$error = htmlspecialchars($error);
|
||||
echo "<div class='alert alert-danger'>$error</div>";
|
||||
}
|
||||
if (empty($validate_cfg)) {
|
||||
|
||||
@@ -74,7 +74,7 @@ if (isset($device['device_id']) && $device['device_id'] > 0) {
|
||||
|
||||
$count = dbFetchCell("SELECT COUNT(*) $query $where", $param);
|
||||
if (isset($_POST['page_num']) && $_POST['page_num'] > 0 && $_POST['page_num'] <= $count) {
|
||||
$page_num = $_POST['page_num'];
|
||||
$page_num = intval($_POST['page_num']);
|
||||
} else {
|
||||
$page_num = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user