From 7b4943947e3702939f3119afd4ab855987138a57 Mon Sep 17 00:00:00 2001 From: devdatt Date: Sat, 27 Dec 2025 17:43:17 +0530 Subject: [PATCH] firewall --- encoder/firewall.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/encoder/firewall.php b/encoder/firewall.php index b918488..47de06d 100644 --- a/encoder/firewall.php +++ b/encoder/firewall.php @@ -46,13 +46,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { array_map('trim', explode(',', (string)$value)), 'strlen' ); - error_log("tmp count is " . count($tmp)); - if (count($tmp) !== 0) { + if (count($tmp) > 0) { foreach ($tmp as $ip) { exec("sudo ufw allow from " . $ip . "to any port " . $port . " proto tcp"); } } else { - error_log("allow all port " . $port); exec("sudo ufw allow " . $port); } }