Skip to content
Open
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
2 changes: 1 addition & 1 deletion lib/mactrack_functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3582,7 +3582,7 @@ function mactrack_site_filter($page = 'mactrack_sites.php') {
<?php print __('Search', 'mactrack'); ?>
</td>
<td>
<input type='text' id='filter' size='25' value='<?php print get_request_var('filter'); ?>'>
<input type='text' id='filter' size='25' value='<?php print html_escape(get_request_var('filter')); ?>'>
</td>
<td>
<?php print __('Sites', 'mactrack'); ?>
Expand Down
2 changes: 1 addition & 1 deletion mactrack_device_types.php
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,7 @@ function mactrack_device_type_filter() {
<?php print __('Search', 'mactrack'); ?>
</td>
<td>
<input type='text' id='filter' size='25' value='<?php print get_request_var('filter'); ?>'>
<input type='text' id='filter' size='25' value='<?php print html_escape(get_request_var('filter')); ?>'>
</td>
<td>
<?php print __('Device Types', 'mactrack'); ?>
Expand Down
2 changes: 1 addition & 1 deletion mactrack_devices.php
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,7 @@ function mactrack_device_filter() {
<?php print __('Search', 'mactrack'); ?>
</td>
<td>
<input type='text' id='filter' size='25' value='<?php print get_request_var('filter'); ?>'>
<input type='text' id='filter' size='25' value='<?php print html_escape(get_request_var('filter')); ?>'>
</td>
<td>
<?php print __('Site', 'mactrack'); ?>
Expand Down
2 changes: 1 addition & 1 deletion mactrack_macauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ function mactrack_maca_filter() {
<?php print __('Search', 'mactrack'); ?>
</td>
<td>
<input type='text' id='filter' size='25' value='<?php print get_request_var('filter'); ?>'>
<input type='text' id='filter' size='25' value='<?php print html_escape(get_request_var('filter')); ?>'>
</td>
<td>
<?php print __('MAC\'s', 'mactrack'); ?>
Expand Down
2 changes: 1 addition & 1 deletion mactrack_macwatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ function mactrack_macw_filter() {
<?php print __('Search', 'mactrack'); ?>
</td>
<td>
<input type='text' id='filter' size='25' value='<?php print get_request_var('filter'); ?>'>
<input type='text' id='filter' size='25' value='<?php print html_escape(get_request_var('filter')); ?>'>
</td>
<td>
<?php print __('Watches', 'mactrack'); ?>
Expand Down
2 changes: 1 addition & 1 deletion mactrack_snmp.php
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ function snmp_options_filter() {
<?php print __('Search', 'mactrack'); ?>
</td>
<td>
<input type='text' id='filter' size='25' value='<?php print get_request_var('filter'); ?>'>
<input type='text' id='filter' size='25' value='<?php print html_escape(get_request_var('filter')); ?>'>
</td>
<td>
<?php print __('Options', 'mactrack'); ?>
Expand Down
2 changes: 1 addition & 1 deletion mactrack_vendormacs.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ function mactrack_vmac_filter() {
<?php print __('Search', 'mactrack'); ?>
</td>
<td>
<input type='text' id='filter' size='25' value='<?php print get_request_var('filter'); ?>'>
<input type='text' id='filter' size='25' value='<?php print html_escape(get_request_var('filter')); ?>'>
</td>
<td>
<?php print __('MAC\'s', 'mactrack'); ?>
Expand Down
2 changes: 1 addition & 1 deletion mactrack_view_arp.php
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ function mactrack_ip_address_filter() {
<?php print __('Search', 'mactrack'); ?>
</td>
<td>
<input type='text' id='filter' size='25' value='<?php print get_request_var('filter'); ?>'>
<input type='text' id='filter' size='25' value='<?php print html_escape(get_request_var('filter')); ?>'>
</td>
<td>
<?php print __('Site', 'mactrack'); ?>
Expand Down
11 changes: 3 additions & 8 deletions mactrack_view_devices.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ function mactrack_view_export_devices() {

$xport_array = [];
array_push($xport_array, 'site_id, site_name, device_id, device_name, notes, ' .
'hostname, snmp_readstring, snmp_readstrings, snmp_version, ' .
'snmp_username, snmp_password, snmp_auth_protocol, snmp_priv_passphrase, ' .
'snmp_priv_protocol, snmp_context, snmp_engine_id, ' .
'hostname, snmp_version, snmp_context, snmp_engine_id, ' .
'snmp_port, snmp_timeout, snmp_retries, max_oids, snmp_sysName, snmp_sysLocation, ' .
'snmp_sysContact, snmp_sysObjectID, snmp_sysDescr, snmp_sysUptime, ' .
'ignorePorts, scan_type, disabled, ports_total, ports_active, ' .
Expand All @@ -119,10 +117,7 @@ function mactrack_view_export_devices() {
$device['site_id'] . '","' . $device['site_name'] . '","' .
$device['device_id'] . '","' . $device['device_name'] . '","' .
$device['notes'] . '","' . $device['hostname'] . '","' .
$device['snmp_readstring'] . '","' . $device['snmp_readstrings'] . '","' .
$device['snmp_version'] . '","' . $device['snmp_username'] . '","' .
$device['snmp_password'] . '","' . $device['snmp_auth_protocol'] . '","' .
$device['snmp_priv_passphrase'] . '","' . $device['snmp_priv_protocol'] . '","' .
$device['snmp_version'] . '","' .
$device['snmp_context'] . '","' . $device['snmp_engine_id'] . '","' .
$device['snmp_port'] . '","' . $device['snmp_timeout'] . '","' .
$device['snmp_retries'] . '","' . $device['max_oids'] . '","' .
Expand Down Expand Up @@ -427,7 +422,7 @@ function mactrack_device_filter2() {
<?php print __('Search', 'mactrack'); ?>
</td>
<td>
<input type='text' id='filter' size='25' value='<?php print get_request_var('filter'); ?>'>
<input type='text' id='filter' size='25' value='<?php print html_escape(get_request_var('filter')); ?>'>
</td>
<td>
<?php print __('Site', 'mactrack'); ?>
Expand Down
2 changes: 1 addition & 1 deletion mactrack_view_interfaces.php
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ function mactrack_filter_table() {
<?php print __('Search', 'mactrack'); ?>
</td>
<td>
<input type='text' id='filter' size='25' value='<?php print get_request_var('filter'); ?>'>
<input type='text' id='filter' size='25' value='<?php print html_escape(get_request_var('filter')); ?>'>
</td>
<td>
<input type='checkbox' id='totals' onChange='applyFilter()' <?php print(get_request_var('totals') == 'true' ? 'checked' : ''); ?>>
Expand Down
7 changes: 5 additions & 2 deletions mactrack_view_macs.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ function form_actions() {

// if we are to save this form, instead of display it
if (isset_request_var('selected_items')) {
$selected_items = unserialize(get_nfilter_request_var('selected_items'));
$selected_items = sanitize_unserialize_selected_items(get_nfilter_request_var('selected_items'));
if (!is_array($selected_items)) {
$selected_items = [];
}

foreach ($selected_items as $mac=>$ip) {
if (!filter_var($mac, FILTER_VALIDATE_MAC)) {
Expand Down Expand Up @@ -1106,7 +1109,7 @@ function mactrack_mac_filter() {
<?php print __('Search', 'mactrack'); ?>
</td>
<td>
<input type='text' id='filter' size='25' value='<?php print get_request_var('filter'); ?>'>
<input type='text' id='filter' size='25' value='<?php print html_escape(get_request_var('filter')); ?>'>
</td>
<td>
<?php print __('Site', 'mactrack'); ?>
Expand Down