Skip to content
Merged
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
# +-------------------------------------------------------------------------+

locales/po/*.mo
.omc/
2 changes: 1 addition & 1 deletion Net/DNS2/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function get($key) {
if ($this->cache_serializer == 'json') {
return json_decode($this->cache_data[$key]['object']);
} else {
return unserialize($this->cache_data[$key]['object']);
return unserialize($this->cache_data[$key]['object'], ['allowed_classes' => false]);
}
Comment thread
TheWitness marked this conversation as resolved.
} else {
return false;
Expand Down
4 changes: 2 additions & 2 deletions Net/DNS2/Cache/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function open($cache_file, $size, $serializer) {
if ($this->cache_serializer == 'json') {
$decoded = json_decode($data, true);
} else {
$decoded = unserialize($data);
$decoded = unserialize($data, ['allowed_classes' => false]);
}

if (is_array($decoded) == true) {
Expand Down Expand Up @@ -145,7 +145,7 @@ public function __destruct() {
if ($this->cache_serializer == 'json') {
$decoded = json_decode($data, true);
} else {
$decoded = unserialize($data);
$decoded = unserialize($data, ['allowed_classes' => false]);
}

if (is_array($decoded) == true) {
Expand Down
4 changes: 2 additions & 2 deletions Net/DNS2/Cache/Shm.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function open($cache_file, $size, $serializer) {
if ($this->cache_serializer == 'json') {
$decoded = json_decode($data, true);
} else {
$decoded = unserialize($data);
$decoded = unserialize($data, ['allowed_classes' => false]);
}

if (is_array($decoded) == true) {
Expand Down Expand Up @@ -195,7 +195,7 @@ public function __destruct() {
if ($this->cache_serializer == 'json') {
$decoded = json_decode($data, true);
} else {
$decoded = unserialize($data);
$decoded = unserialize($data, ['allowed_classes' => false]);
}

if (is_array($decoded) == true) {
Expand Down
6 changes: 3 additions & 3 deletions lib/mactrack_functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3713,16 +3713,16 @@ function exportRows() {
}

$(function() {
$('#mactrack').submit(function(event) {
$('#mactrack').on('submit', function(event) {
event.preventDefault();
applyFilter();
});

$('#clear').click(function() {
$('#clear').on('click', function() {
clearFilter();
});

$('#export').click(function() {
$('#export').on('click', function() {
exportRows();
});

Expand Down
10 changes: 5 additions & 5 deletions mactrack_device_types.php
Original file line number Diff line number Diff line change
Expand Up @@ -1180,24 +1180,24 @@ function scanDeviceType() {
}

$(function() {
$('#mactrack').submit(function(event) {
$('#mactrack').on('submit', function(event) {
event.preventDefault();
applyFilter();
});

$('#clear').click(function() {
$('#clear').on('click', function() {
clearFilter();
});

$('#export').click(function() {
$('#export').on('click', function() {
exportRows();
});

$('#import').click(function() {
$('#import').on('click', function() {
importRows();
});

$('#scan').click(function() {
$('#scan').on('click', function() {
scanDeviceType();
});
});
Expand Down
8 changes: 4 additions & 4 deletions mactrack_devices.php
Original file line number Diff line number Diff line change
Expand Up @@ -1315,20 +1315,20 @@ function importRows() {
}

$(function() {
$('#mactrack').submit(function(event) {
$('#mactrack').on('submit', function(event) {
event.preventDefault();
applyFilter();
});

$('#clear').click(function() {
$('#clear').on('click', function() {
clearFilter();
});

$('#export').click(function() {
$('#export').on('click', function() {
exportRows();
});

$('#import').click(function() {
$('#import').on('click', function() {
importRows();
});
});
Expand Down
6 changes: 3 additions & 3 deletions mactrack_macauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ function mactrack_maca_filter() {
</td>
</tr>
</table>
<input type='hidden' id='page' value='<?php print get_request_var('page'); ?>'>
<input type='hidden' id='page' value='<?php print html_escape_request_var('page'); ?>'>
</form>
<script type='text/javascript'>

Expand All @@ -424,12 +424,12 @@ function clearFilter() {
}

$(function() {
$('#mactrack').submit(function(event) {
$('#mactrack').on('submit', function(event) {
event.preventDefault();
applyFilter();
});

$('#clear').click(function() {
$('#clear').on('click', function() {
clearFilter();
});
});
Expand Down
6 changes: 3 additions & 3 deletions mactrack_macwatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ function mactrack_macw_filter() {
</td>
</tr>
</table>
<input type='hidden' id='page' value='<?php print get_request_var('page'); ?>'>
<input type='hidden' id='page' value='<?php print html_escape_request_var('page'); ?>'>
</form>
<script type='text/javascript'>

Expand All @@ -432,12 +432,12 @@ function clearFilter() {
}

$(function() {
$('#mactrack').submit(function(event) {
$('#mactrack').on('submit', function(event) {
event.preventDefault();
applyFilter();
});

$('#clear').click(function() {
$('#clear').on('click', function() {
clearFilter();
});
});
Expand Down
10 changes: 5 additions & 5 deletions mactrack_snmp.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ function mactrack_snmp_item_edit() {
<script type='text/javascript'>
$(function() {
setSNMP();
$('#snmp_version').change(function() {
$('#snmp_version').on('change', function() {
setSNMP();
});
});
Expand Down Expand Up @@ -635,7 +635,7 @@ function snmp_options_filter() {
</td>
</tr>
</table>
<input type='hidden' name='page' value='<?php print get_request_var('page'); ?>'>
<input type='hidden' name='page' value='<?php print html_escape_request_var('page'); ?>'>
</td>
</form>
<script type='text/javascript'>
Expand All @@ -653,15 +653,15 @@ function clearFilter() {
}

$(function() {
$('#go').click(function() {
$('#go').on('click', function() {
applyFilter();
});

$('#clear').click(function() {
$('#clear').on('click', function() {
clearFilter();
});

$('#mactrack_snmp').unbind().submit(function(event) {
$('#mactrack_snmp').off().on('submit', function(event) {
event.preventDefault();
applyFilter();
});
Expand Down
2 changes: 1 addition & 1 deletion mactrack_utilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ function applyFilter() {
}

$(function() {
$('#refresh').click(function() {
$('#refresh').on('click', function() {
applyFilter();
});
});
Expand Down
6 changes: 3 additions & 3 deletions mactrack_vendormacs.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,16 +246,16 @@ function exportRows() {
}

$(function() {
$('#mactrack').submit(function(event) {
$('#mactrack').on('submit', function(event) {
event.preventDefault();
applyFilter();
});

$('#clear').click(function() {
$('#clear').on('click', function() {
clearFilter();
});

$('#export').click(function() {
$('#export').on('click', function() {
exportRows();
});
});
Expand Down
6 changes: 3 additions & 3 deletions mactrack_view_arp.php
Original file line number Diff line number Diff line change
Expand Up @@ -624,16 +624,16 @@ function exportRows() {
}

$(function() {
$('#mactrack').submit(function(event) {
$('#mactrack').on('submit', function(event) {
event.preventDefault();
applyFilter();
});

$('#clear').click(function() {
$('#clear').on('click', function() {
clearFilter();
});

$('#export').click(function() {
$('#export').on('click', function() {
exportRows();
});
});
Expand Down
8 changes: 4 additions & 4 deletions mactrack_view_devices.php
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ function mactrack_device_filter2() {
</td>
</tr>
</table>
<input type='hidden' id='page' value='<?php print get_request_var('page'); ?>'>
<input type='hidden' id='page' value='<?php print html_escape_request_var('page'); ?>'>
<input type='hidden' id='report' value='devices'>
</form>
<script type='text/javascript'>
Expand All @@ -569,16 +569,16 @@ function exportRows() {
}

$(function() {
$('#mactrack').submit(function(event) {
$('#mactrack').on('submit', function(event) {
event.preventDefault();
applyFilter();
});

$('#clear').click(function() {
$('#clear').on('click', function() {
clearFilter();
});

$('#export').click(function() {
$('#export').on('click', function() {
exportRows();
});
});
Expand Down
6 changes: 3 additions & 3 deletions mactrack_view_dot1x.php
Original file line number Diff line number Diff line change
Expand Up @@ -756,16 +756,16 @@ function exportRows() {
}

$(function() {
$('#mactrack').submit(function(event) {
$('#mactrack').on('submit', function(event) {
event.preventDefault();
applyFilter();
});

$('#clear').click(function() {
$('#clear').on('click', function() {
clearFilter();
});

$('#export').click(function() {
$('#export').on('click', function() {
exportRows();
});
});
Expand Down
6 changes: 3 additions & 3 deletions mactrack_view_interfaces.php
Original file line number Diff line number Diff line change
Expand Up @@ -685,16 +685,16 @@ function exportRows() {
}

$(function() {
$('#mactrack').submit(function(event) {
$('#mactrack').on('submit', function(event) {
event.preventDefault();
applyFilter();
});

$('#clear').click(function() {
$('#clear').on('click', function() {
clearFilter();
});

$('#export').click(function() {
$('#export').on('click', function() {
exportRows();
});

Expand Down
6 changes: 3 additions & 3 deletions mactrack_view_ips.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ function mactrack_ips_filter() {
</td>
</tr>
</table>
<input type='hidden' id='page' value='<?php print get_request_var('page'); ?>'>
<input type='hidden' id='page' value='<?php print html_escape_request_var('page'); ?>'>
<input type='hidden' id='report' value='ips'>
</form>
<script type='text/javascript'>
Expand All @@ -361,11 +361,11 @@ function exportRows() {
}

$(function() {
$('#clear').click(function() {
$('#clear').on('click', function() {
clearFilter();
});

$('#export').submit(function(event) {
$('#export').on('submit', function(event) {
event.preventDefault();
exportRows();
});
Expand Down
8 changes: 4 additions & 4 deletions mactrack_view_macs.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function form_actions() {

// if we are to save this form, instead of display it
if (isset_request_var('selected_items')) {
$selected_items = cacti_unserialize(stripslashes(get_nfilter_request_var('selected_items')));
$selected_items = unserialize(get_nfilter_request_var('selected_items'), ['allowed_classes' => false]);

if (!is_array($selected_items)) {
header('Location: mactrack_view_macs.php');
Expand Down Expand Up @@ -1352,16 +1352,16 @@ function exportRows() {
}

$(function() {
$('#mactrack').submit(function(event) {
$('#mactrack').on('submit', function(event) {
event.preventDefault();
applyFilter();
});

$('#clear').click(function() {
$('#clear').on('click', function() {
clearFilter();
});

$('#export').click(function() {
$('#export').on('click', function() {
exportRows();
});
});
Expand Down
Loading