From patchwork Sun Jul 11 17:54:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 4507 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4GNF061vm2z3xCm for ; Sun, 11 Jul 2021 17:54:30 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4GNF046FHNz17N; Sun, 11 Jul 2021 17:54:28 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4GNF045D56z2xqw; Sun, 11 Jul 2021 17:54:28 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4GNF034sb7z2xJw for ; Sun, 11 Jul 2021 17:54:27 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4GNF025l6hz12l; Sun, 11 Jul 2021 17:54:26 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1626026067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=u6w3LWdKxCFmQTjkMmqvy5/+9/6WEMHA0vfwJSZP0uI=; b=f93zH5zl8ayw9jFW4DcMBs73tjLl21/NuBB4rB2c1Ljn3xYkMZNow8dNG66sp3TxjXzbKI sCLQtkShFCMjwqDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1626026067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=u6w3LWdKxCFmQTjkMmqvy5/+9/6WEMHA0vfwJSZP0uI=; b=C4BPJV/Zsm/w6MVBx0MttLXE1b6mnOlmL1lxT/1bOhgVOkT7l1p7PFy2PVcGRMMJCQuKTA iGthTOpE7EOHwiE3SwaYgswTvt8GnKT9WR8VKRAgcvxOnP/OQqVhKuG6JnJB4+TxcKQcoW e1zOfsDjMR5a84lzxtIYt6EfNdVuqXnGBrYgUdvlSXamuHUzlTRoPLVLwW572+cJsjzE79 UYrJWJZBJyOVHBqk2JUUZ0YmVtR8niNRze7UNgyuWiREhf7RtH1B195USbl/L1chCwN+ct oSGwbD/dSONsxBr8nBJTXa4H67MT9tGOIc2l1FQDKtpJEnNbWdfBiJmpMgGIow== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH 1/3] firewall.cgi: Remove faulty assignments for selected hash. Date: Sun, 11 Jul 2021 19:54:16 +0200 Message-Id: <20210711175419.3582-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" The removed assignments are wrong because both are trying to assign something different to the same key and will overwrite each other. Secondary the assignment to the hash is not needed at this place, so it safely can be removed. Signed-off-by: Stefan Schantl --- html/cgi-bin/firewall.cgi | 2 -- 1 file changed, 2 deletions(-) diff --git a/html/cgi-bin/firewall.cgi b/html/cgi-bin/firewall.cgi index 70dee8d3c..d3cddfa23 100644 --- a/html/cgi-bin/firewall.cgi +++ b/html/cgi-bin/firewall.cgi @@ -1022,8 +1022,6 @@ sub gen_dd_block $checked{'TIME_SUN'}{$fwdfwsettings{'TIME_SUN'}} = 'CHECKED'; $selected{'TIME_FROM'}{$fwdfwsettings{'TIME_FROM'}} = 'selected'; $selected{'TIME_TO'}{$fwdfwsettings{'TIME_TO'}} = 'selected'; - $selected{'ipfire'}{$fwdfwsettings{$fwdfwsettings{'grp1'}}} ='selected'; - $selected{'ipfire'}{$fwdfwsettings{$fwdfwsettings{'grp2'}}} ='selected'; print< From patchwork Sun Jul 11 17:54:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 4508 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4GNF072T3Fz3xGp for ; Sun, 11 Jul 2021 17:54:31 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4GNF050Kjkz1Pq; Sun, 11 Jul 2021 17:54:29 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4GNF045zVpz2yy9; Sun, 11 Jul 2021 17:54:28 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4GNF041jjDz2xJw for ; Sun, 11 Jul 2021 17:54:28 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4GNF036LrMz14c; Sun, 11 Jul 2021 17:54:27 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1626026068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XwVWNJwJr8gMmH34iaCAYb8az7MPA5+VP0aVkl2dYjM=; b=MumtlR48UPwfEGjYTsSKLp3P3XICX0BSghbJEXsNQs2Mz1ptJ7T2ZJqn9P9trJUTNnBYO3 z4+Xs6CZdcuRiGCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1626026068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XwVWNJwJr8gMmH34iaCAYb8az7MPA5+VP0aVkl2dYjM=; b=uclQMBEzcOSSUDYxMzBRY82/ARvTmYC6xLb9gSwartHlbrY2NHyMCryvIXnQS/bzm/L2oD nOLiPHkTYW8SFMfiPpLHE3PR1eRU0dHKjG4er+h39OpmKf7xcOTcAdcFGj3PTMt3nuzCmW QnvIAO1jQIFIyQYG2PiAPTFahNyxs8+sUWWztmONmqplIfrW+FWV0a4o4/UejkWp72vN/z 57JJWcGfmHqa2i3kM7etz7iHcJTlqeKbzXuWnDeFclqg3w5leoZC5EuS7N4O8js5xQvM3n sE5jXiBBx9Lm/8Hs9lvqDgLa1vhu3oVxMMkpmFDi+mcujCAbPctJHQfWX15s8w== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH 2/3] firewall.cgi: Fix multiple usage of configured net or interface. Date: Sun, 11 Jul 2021 19:54:17 +0200 Message-Id: <20210711175419.3582-2-stefan.schantl@ipfire.org> In-Reply-To: <20210711175419.3582-1-stefan.schantl@ipfire.org> References: <20210711175419.3582-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" When configuring a standard network as source or target the same interface would be pre-selected as firewall interface when editing an existing rule. In case an existing input rule with an configured firewall interface should be changed, the same network device has been pre-selected in the standard networks dropdown box. This easily confuses users and may lead to false configurations when saving an edited rule. Signed-off-by: Stefan Schantl --- html/cgi-bin/firewall.cgi | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/html/cgi-bin/firewall.cgi b/html/cgi-bin/firewall.cgi index d3cddfa23..8d6adee96 100644 --- a/html/cgi-bin/firewall.cgi +++ b/html/cgi-bin/firewall.cgi @@ -1032,7 +1032,12 @@ END { next if($defaultNetworks{$network}{'NAME'} eq "IPFire"); print "