Skip to content

Commit

Permalink
Fix custom ports xss (#16722)
Browse files Browse the repository at this point in the history
Introduced by #15255
  • Loading branch information
murrant authored Nov 17, 2024
1 parent 8ac7a6a commit 26258a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/html/functions.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -782,9 +782,9 @@ function dynamic_override_config($type, $name, $device)
$checked = '';
}
if ($type == 'checkbox') {
return '<input type="checkbox" id="override_config" name="override_config" data-attrib="' . $name . '" data-device_id="' . $device['device_id'] . '" data-size="small" ' . $checked . '>';
return '<input type="checkbox" id="override_config" name="override_config" data-attrib="' . htmlentities($name) . '" data-device_id="' . $device['device_id'] . '" data-size="small" ' . $checked . '>';
} elseif ($type == 'text') {
return '<input type="text" id="override_config_text" name="override_config_text" data-attrib="' . $name . '" data-device_id="' . $device['device_id'] . '" value="' . $attrib_val . '">';
return '<input type="text" id="override_config_text" name="override_config_text" data-attrib="' . htmlentities($name) . '" data-device_id="' . $device['device_id'] . '" value="' . htmlentities($attrib_val) . '">';
}
}//end dynamic_override_config()

Expand Down

0 comments on commit 26258a2

Please sign in to comment.