Revision 82e22457
Added by Marcos M about 1 year ago
src/etc/inc/system.inc | ||
---|---|---|
1576 | 1576 |
} |
1577 | 1577 |
|
1578 | 1578 |
if (file_exists("{$g['tmp_path']}/.system_routes.apply")) { |
1579 |
$toapplylist = unserialize(file_get_contents("{$g['tmp_path']}/.system_routes.apply"));
|
|
1579 |
$toapplylist = unserialize_data(file_get_contents("{$g['tmp_path']}/.system_routes.apply"), []);
|
|
1580 | 1580 |
} else { |
1581 | 1581 |
$toapplylist = array(); |
1582 | 1582 |
} |
1583 | 1583 |
|
1584 | 1584 |
if (file_exists("{$g['tmp_path']}/staticroute_{$id}") && |
1585 | 1585 |
file_exists("{$g['tmp_path']}/staticroute_{$id}_gw")) { |
1586 |
$delete_targets = unserialize(file_get_contents("{$g['tmp_path']}/staticroute_{$id}"));
|
|
1587 |
$delgw = lookup_gateway_ip_by_name(unserialize(file_get_contents("{$g['tmp_path']}/staticroute_{$id}_gw"))); |
|
1586 |
$delete_targets = unserialize_data(file_get_contents("{$g['tmp_path']}/staticroute_{$id}"), []);
|
|
1587 |
$delgw = lookup_gateway_ip_by_name(unserialize_data(file_get_contents("{$g['tmp_path']}/staticroute_{$id}_gw")));
|
|
1588 | 1588 |
if (count($delete_targets)) { |
1589 | 1589 |
foreach ($delete_targets as $dts) { |
1590 | 1590 |
if (is_subnetv4($dts)) { |
Also available in: Unified diff
Add a helper function for unserialize(). Fix #15423
For calls to unserialize() which do not check for errors, use the
helper function instead.