From patchwork Mon Apr 6 17:38:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 2915 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 "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 48wySl6BWWz3wdp for ; Mon, 6 Apr 2020 17:38:47 +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) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 48wySk5Zx3zJm; Mon, 6 Apr 2020 17:38:46 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 48wySk48ZQz2yRQ; Mon, 6 Apr 2020 17:38:46 +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) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 48wySh5DqLz2y5S for ; Mon, 6 Apr 2020 17:38:44 +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) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 48wySg62yBzJm; Mon, 6 Apr 2020 17:38:43 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1586194723; 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=VXwesXg//m8osc2/74s4M1yNQ69mqSsaoahTFJU0jnc=; b=cfuaA2eanDT2/oPC04nD/xHR3XJDgZSdzVb37SBGwnX/ClBndV6SnBY2+jnUfMeMmmn7an DIBBjmo4DbM4hSDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1586194723; 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=VXwesXg//m8osc2/74s4M1yNQ69mqSsaoahTFJU0jnc=; b=BEKaYXSBHa8AGgWe6xVqgx6ShAUJr6rxB8XCfd3c6SxpRSSNXy9QcGpLCXcS/SVQUzVwgB dXS3r5/vx4emisuaImmqGN8aD6zjStEH0zNRydD6OB991nL0QWA2laJy0SU3cyksYLF/ue WvT1qU1ib664uoeXNy/zYHwEpsr4Ko9X5cbTAFXj+BWcYv6G5/GrhJFNeDKUD6TcWh90L7 0au4rmstLiofJp1/00v3/sdAqQc+Q8uUBdHaoxhSjvvncFJTk6LEiqHzFWUloyyCQoK2Zj 9tekl7r/2BNhroanbj/liwn51e2GOIXmlGKJJqidXtBoT9wYb++1/05x07sdnQ== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH] zoneconf.cgi: Skip checks for non-existing zones Date: Mon, 6 Apr 2020 17:38:38 +0000 Message-Id: <20200406173838.23960-1-michael.tremer@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: , Cc: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" On systems with RED on PPP and no BLUE or ORANGE zones, there would always be an error when handling non-existant input. Signed-off-by: Michael Tremer --- html/cgi-bin/zoneconf.cgi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/html/cgi-bin/zoneconf.cgi b/html/cgi-bin/zoneconf.cgi index 6b8642818..d99a3e611 100644 --- a/html/cgi-bin/zoneconf.cgi +++ b/html/cgi-bin/zoneconf.cgi @@ -211,6 +211,8 @@ if ($cgiparams{"ACTION"} eq $Lang::tr{"save"}) { my $mac = $_->[0]; my $nic_access = $cgiparams{"ACCESS $uc $mac"}; + next unless ($nic_access); + if ($nic_access ne "NONE") { if ($VALIDATE_nic_check{"RESTRICT $mac"}) { # If this interface is already assigned to RED in PPP mode, throw an error $VALIDATE_error = $Lang::tr{"zoneconf val ppp assignment error"};