mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 03:16:12 +00:00
System: High Availability: Settings - escape shell arguments for consistency (https://github.com/opnsense/core/issues/7485)
This commit is contained in:
parent
65ab1fd638
commit
c216e560b3
@ -1281,14 +1281,14 @@ function interfaces_carp_setup()
|
||||
|
||||
if (!empty($carp_sync_int) && isset($config['hasync']['pfsyncenabled'])) {
|
||||
if (!empty($config['hasync']['pfsyncpeerip']) && is_ipaddrv4($config['hasync']['pfsyncpeerip'])) {
|
||||
$syncpeer = "syncpeer {$config['hasync']['pfsyncpeerip']}";
|
||||
$syncpeer = "syncpeer " . escapeshellarg($config['hasync']['pfsyncpeerip']);
|
||||
} else {
|
||||
$syncpeer = "-syncpeer";
|
||||
}
|
||||
|
||||
$version = '';
|
||||
if (!empty($config['hasync']['version'])) {
|
||||
$version = 'version ' . $config['hasync']['version'];
|
||||
$version = 'version ' . escapeshellarg($config['hasync']['version']);
|
||||
}
|
||||
|
||||
$intf_stats = legacy_interfaces_details();
|
||||
@ -1296,7 +1296,7 @@ function interfaces_carp_setup()
|
||||
mwexec("/sbin/ifconfig pfsync0 syncdev {$carp_sync_int} {$syncpeer} {$version} up");
|
||||
|
||||
if (!empty($intf_stats[$carp_sync_int]['mtu'])) {
|
||||
mwexec("/sbin/ifconfig pfsync0 mtu {$intf_stats[$carp_sync_int]['mtu']}");
|
||||
mwexec("/sbin/ifconfig pfsync0 mtu " . escapeshellarg($intf_stats[$carp_sync_int]['mtu']));
|
||||
}
|
||||
} else {
|
||||
mwexec('/sbin/ifconfig pfsync0 -syncdev -syncpeer down');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user