Skip to content

Commit e5c91a0

Browse files
authored
Security fixes XSS in oxidized-cfg-check.inc.php and print-customoid.php (#14126)
Signed-off-by: AL-KASSAR <[email protected]>
1 parent 98da97c commit e5c91a0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

includes/html/pages/tools/oxidized-cfg-check.inc.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
$oxidized_cfg = Yaml::parse($_POST['config']);
99
$validate_cfg = validate_oxidized_cfg($oxidized_cfg);
1010
foreach ($validate_cfg as $error) {
11+
$error = htmlspecialchars($error);
1112
echo "<div class='alert alert-danger'>$error</div>";
1213
}
1314
if (empty($validate_cfg)) {

includes/html/print-customoid.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474

7575
$count = dbFetchCell("SELECT COUNT(*) $query $where", $param);
7676
if (isset($_POST['page_num']) && $_POST['page_num'] > 0 && $_POST['page_num'] <= $count) {
77-
$page_num = $_POST['page_num'];
77+
$page_num = intval($_POST['page_num']);
7878
} else {
7979
$page_num = 1;
8080
}

0 commit comments

Comments
 (0)