mirror of
https://github.com/unraid/webgui.git
synced 2026-04-24 11:19:25 -05:00
logger - ensure params are escaped
This commit is contained in:
@@ -12,6 +12,9 @@
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
$docroot ??= ($_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp');
|
||||
require_once "$docroot/webGui/include/Wrappers.php";
|
||||
|
||||
$set = $ifname = $argv[1];
|
||||
$run = $set != 'none';
|
||||
$ini = parse_ini_file('/var/local/emhttp/network.ini',true); ksort($ini,SORT_NATURAL);
|
||||
@@ -25,7 +28,7 @@ function update_wireguard($ifname) {
|
||||
$vtun = basename($wg,'.conf');
|
||||
// interface has changed?
|
||||
if (exec("grep -Pom1 ' dev $nic ' $wg")=='') {
|
||||
exec("logger -t netconfig -- \"updated wireguard $vtun configuration\"");
|
||||
my_logger('netconfig', "updated wireguard $vtun configuration");
|
||||
exec("sed -ri 's/ dev (br0|bond0|eth0) / dev $nic /' $wg");
|
||||
}
|
||||
// restart active wireguard tunnels
|
||||
|
||||
Reference in New Issue
Block a user