From patchwork Tue Sep 7 15:53:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo-Andres Hofmann X-Patchwork-Id: 4689 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 4H3qYk0z71z3x2Y for ; Tue, 7 Sep 2021 15:53: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) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4H3qYh0H5Rz2Bf; Tue, 7 Sep 2021 15:53:28 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4H3qYg55TJz2y0B; Tue, 7 Sep 2021 15:53:27 +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 4H3qYf3NLCz2xcT for ; Tue, 7 Sep 2021 15:53:26 +0000 (UTC) Received: from arche.uberspace.de (arche.uberspace.de [185.26.156.147]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPS id 4H3qYY04CSz94 for ; Tue, 7 Sep 2021 15:53:20 +0000 (UTC) Received: (qmail 17648 invoked from network); 7 Sep 2021 15:53:19 -0000 Received: from localhost (HELO localhost) (127.0.0.1) by arche.uberspace.de with SMTP; 7 Sep 2021 15:53:19 -0000 From: Leo-Andres Hofmann To: development@lists.ipfire.org Subject: [PATCH] ovpnmain.cgi: Remove unnecessary check/error message Date: Tue, 7 Sep 2021 17:53:09 +0200 Message-Id: <20210907155309.1896-1-hofmann@leo-andres.de> X-Mailer: git-send-email 2.27.0.windows.1 MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1631030001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=m4D0T8al4ri4SbbmJyKq3Yw6A//AhTBod0+PWwdRUXU=; b=s+6cAx/W14WGQcvWA6z/pu8hG+y1MfXcooQtRwyFYAeKuFjxpj7Wai99DT3++oN2tufZ1y hJEMR7NoCRB1nXxwSy4ngrs+dDFSts81gPa1oSGaeawVDBJEGYHGiDZ7WTRLXxUff0QKKr Dy7v1KLmYBn/1V5S5blOyBEsRIRQ1WO+yEdQXvLycDRKa7zwbYvb9YWZx8/1r/gsVDozJZ 7ba3cmvZM9brN+miBu19qQyr3oWs+NvCg3vn1DXUoCEsOEOiUdAiJ11M1/yzjqwCK42dcr 9NWDwToatK8s/fLvPNbCfMujI538dnJzKlb4jMrXSQfNp64aI3sCt3NDvEahRQ== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=none; dmarc=none; spf=pass (mail01.ipfire.org: domain of hofmann@leo-andres.de designates 185.26.156.147 as permitted sender) smtp.mailfrom=hofmann@leo-andres.de ARC-Seal: i=1; s=202003rsa; d=lists.ipfire.org; t=1631030001; a=rsa-sha256; cv=none; b=h82IbKUNzePQCK+wAtOGNGo7Q533kknykhNYkExd/dKwj4+RtCB2qMccdkOHER/JQkfUHv 4L+AhNhdD5j3dyYO1JP9iUX4rFr/FdyGdSV3a8lfyUnErqCPD8+gM88n/G5bzCYgbnlUs9 ShBna4BiSWKRn2DDhtSXz77ZXcCRWpwi8aG2oCcxCkOjf3Pp+8o2Uc8SVmxxFms1xFNgji 3hGmgsnjjWvcoluPZ4xPznglxHUGA5kgIjXtdJwop2x8wEOFaogZb3USkaaHK04cm/cwcL APhrgA9HfQ4pInVwXV0rccNQu45l2+njeyoWfUe08L1TxzJHwdVzWASo6z2Idg== Authentication-Results: mail01.ipfire.org; dkim=none; dmarc=none; spf=pass (mail01.ipfire.org: domain of hofmann@leo-andres.de designates 185.26.156.147 as permitted sender) smtp.mailfrom=hofmann@leo-andres.de X-Rspamd-Queue-Id: 4H3qYY04CSz94 X-Spamd-Result: default: False [-3.08 / 11.00]; BAYES_HAM(-2.99)[99.97%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM(-0.97)[-0.973]; SPF_REPUTATION_HAM(-0.80)[-0.80371905916894]; MX_INVALID(0.50)[]; R_MISSING_CHARSET(0.50)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; IP_REPUTATION_HAM(-0.01)[asn: 205766(0.00), country: DE(-0.01), ip: 185.26.156.147(0.00)]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:205766, ipnet:185.26.156.0/24, country:DE]; R_DKIM_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[leo-andres.de]; TO_DN_NONE(0.00)[]; RCVD_TLS_LAST(0.00)[] X-Rspamd-Server: mail01.haj.ipfire.org 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" This parameter can either be "host" or "net", but the existing check only allows "net" entries. Since other entries are also valid but don't require further action, this patch removes the error message. Fixes: #12686 Signed-off-by: Leo-Andres Hofmann Reviewed-by: Michael Tremer --- html/cgi-bin/ovpnmain.cgi | 3 --- 1 file changed, 3 deletions(-) diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi index 3cd2f9381..2ebf384ed 100644 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@ -2183,9 +2183,6 @@ END &General::system("/usr/local/bin/openvpnctrl", "-kn2n", "$confighash{$cgiparams{'KEY'}}[1]"); &writecollectdconf(); } - - } else { - $errormessage = $Lang::tr{'invalid key'}; } } }