mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/upnp: safe execution change
shell_safe() is better than raw exec() although we do not have any dynamic shell arguments to handle. This call requires a new explode extension (true parameter) that will be available in 25.7.8
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("util.inc");
|
||||
require_once("plugins.inc.d/miniupnpd.inc");
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
@@ -42,8 +43,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
}
|
||||
}
|
||||
|
||||
$rdr_entries = array();
|
||||
exec("/sbin/pfctl -P -a miniupnpd -s nat; /sbin/pfctl -P -a miniupnpd -s rules", $rdr_entries, $pf_ret);
|
||||
$rdr_entries = shell_safe('/sbin/pfctl -P -a miniupnpd -s nat; /sbin/pfctl -P -a miniupnpd -s rules', [], true);
|
||||
|
||||
$service_hook = 'miniupnpd';
|
||||
include("head.inc");
|
||||
|
||||
Reference in New Issue
Block a user