From patchwork Tue Feb 16 13:30:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 3892 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 RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4Dg2056QFbz3xCP for ; Tue, 16 Feb 2021 13:30:13 +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 4Dg2045w4vz1Tq; Tue, 16 Feb 2021 13:30:12 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Dg2044c3mz2xmx; Tue, 16 Feb 2021 13:30:12 +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 RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4Dg20320Dtz2xVp for ; Tue, 16 Feb 2021 13:30:11 +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 4Dg202300YzfT; Tue, 16 Feb 2021 13:30:10 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1613482210; 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=Xir4eS/nmqqkQu//o7t7XMr3f7dPzgJ3zqf8qlMetnU=; b=FeV72Zh5LOSbjYlXQRK8iX4PdPC0LI1eo1fOTCq+uqEuYPPswC66mTdMhFbjYcEUmmo0hI 3Wfd+04Z/Q3q76AQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1613482210; 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=Xir4eS/nmqqkQu//o7t7XMr3f7dPzgJ3zqf8qlMetnU=; b=CwaSLFEVSRYyO54WlHq5Sp6fVVdswurR152W+j3PQ4EzpwKpGaplGx3/ucAYLnI5MBL7yL Q+vOm/MIjaNdKiRPg4iGsNfiYJPZ542EqOpxvCAFhLMR+jyV60VywR+IhMD0hEeSNBstt+ hK0EnEvKiSCvkq1V61w7BI8r58uw9znX+Kh9m/lmQFynUuEY0Ngui8Qsf6K4kgkvWuZ6z0 PKxWxY0EbU12uSrP/yHfr2Ii8Z8LH0RFOLsokXtL99QhpFsfwbRUjK+ioWtre7QFeU0uSS KYMuefN9U6yXVyW2L9fSWLpoeQrRDHpgkrcGrZEfeZ1/Y3eikGS+PE+rBSTvSg== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH] dhcp.cgi: Fix incorrect { placement from patch 3724 Date: Tue, 16 Feb 2021 14:30:10 +0100 Message-Id: <20210216133010.7645-1-adolf.belka@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 patch 3724 was created for bug #10743 a curly bracket was placed in the wrong place This results in the overlap of two if loops meaning that there will be no validity check carried out on Default Lease Time if Deny Known Clients is not checked. - This patch moves the { bracket to the right location. Signed-off-by: Adolf Belka --- html/cgi-bin/dhcp.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/cgi-bin/dhcp.cgi b/html/cgi-bin/dhcp.cgi index 2ebdde818..867614f2a 100644 --- a/html/cgi-bin/dhcp.cgi +++ b/html/cgi-bin/dhcp.cgi @@ -180,12 +180,12 @@ if ($dhcpsettings{'ACTION'} eq $Lang::tr{'save'}) { if (($dhcpsettings{"START_ADDR_${itf}"}) eq '' && ($dhcpsettings{"END_ADDR_${itf}"}) eq '') { $errormessage = "DHCP on ${itf}: " . $Lang::tr{'dhcp valid range required when deny known clients checked'}; goto ERROR; + } } if (!($dhcpsettings{"DEFAULT_LEASE_TIME_${itf}"} =~ /^\d+$/)) { $errormessage = "DHCP on ${itf}: " . $Lang::tr{'invalid default lease time'} . $dhcpsettings{'DEFAULT_LEASE_TIME_${itf}'}; goto ERROR; - } } if (!($dhcpsettings{"MAX_LEASE_TIME_${itf}"} =~ /^\d+$/)) {