ovpnmain.cgi: Fixes bug13869 - shows values from vpnsettings in advanced server page
Message ID | 20250820165147.21850-1-adolf.belka@ipfire.org |
---|---|
State | Staged |
Commit | 922c244692d7792ad3c57f3cf3a26aecc3398899 |
Headers |
Return-Path: <development+bounces-824-patchwork=ipfire.org@lists.ipfire.org> 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 (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4c6XY671l8z3wkk for <patchwork@web04.haj.ipfire.org>; Wed, 20 Aug 2025 16:51:54 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [IPv6:2001:678:b28::201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "mail02.haj.ipfire.org", Issuer "E6" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4c6XY60kN4z5NZ for <patchwork@ipfire.org>; Wed, 20 Aug 2025 16:51:54 +0000 (UTC) Authentication-Results: mail01.ipfire.org; dkim=pass header.d=ipfire.org header.s=202003ed25519 header.b=WD5boPru; dkim=pass header.d=ipfire.org header.s=202003rsa header.b=tsisBL9u; spf=softfail (mail01.ipfire.org: 2001:678:b28::201 is neither permitted nor denied by domain of "development+bounces-824-patchwork=ipfire.org@lists.ipfire.org") smtp.mailfrom="development+bounces-824-patchwork=ipfire.org@lists.ipfire.org"; dmarc=pass (policy=reject) header.from=ipfire.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1755708714; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=UkhI+csDNgIfcTNNgcyUJQ+jGYAIFR1YMqZ6YNpnoqg=; b=D1UB3G1yyx18H95w3Zd4QPHOvF8JTLvovDEHfwligg9oUodyjK0n6SrcdnhkgSJQJegAIW DQEQay5EZ7EYQWPV6QD2856c9gq5oUqtKNck5/cDmDeBrknv+k4nQnUOTELZOZ9woce9gS k3qMtBaKh4r1jCLOjb3nRfTOIpxhdpPa3ZjTj+HUp/xwCSr/Njz2YMzNPxbwGvNDiv/Tk2 SnNeb3DLERR5O4/iEugMf9HxFGKkN/tuBdBtBGUBOJ+MS9BB7Rc/ws5rJB8wCrMBc1LCN4 Z/9c7lFGn2/k30o5xYz5BEtApYIL6yWAshEcoN/H0Rix5d5I0rGej8J5J2/3lw== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=pass header.d=ipfire.org header.s=202003ed25519 header.b=WD5boPru; dkim=pass header.d=ipfire.org header.s=202003rsa header.b=tsisBL9u; spf=softfail (mail01.ipfire.org: 2001:678:b28::201 is neither permitted nor denied by domain of "development+bounces-824-patchwork=ipfire.org@lists.ipfire.org") smtp.mailfrom="development+bounces-824-patchwork=ipfire.org@lists.ipfire.org"; dmarc=pass (policy=reject) header.from=ipfire.org ARC-Seal: i=1; s=202003rsa; d=ipfire.org; t=1755708714; a=rsa-sha256; cv=none; b=kELiXzowP9grzEro95IXNXhEtDGr7JyHpk9BdWIHtkPOt1XV0P7fIpyOzdYT2iJiiAK4wE hhanXi2PLAVWl17Xoyv1T0L+7T9FA6RfLjKTyvOsXv5tZMd2vrIObDz3maxyuw7MuSCUyz y4pb+2t3FlCrUug7qe8ldA4sxVHD3HEOJ79ABXKYSxJsnWJ/MjX951YMaM8DHwnnReYS0U oIHSWehOD15gHyOVR2ykSc6ESJQEsRPlA380+uViroNb5CM5igvBLE8jYCmCIhigmsH7qx IXcOuOB1U1MLwgwTiAXdqji960zWFWwu+7XroV3YGS2MxBDifC5xmFmBgc3NIg== Received: from mail02.haj.ipfire.org (localhost [IPv6:::1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4c6XY6039wz2xXb for <patchwork@ipfire.org>; Wed, 20 Aug 2025 16:51:54 +0000 (UTC) X-Original-To: development@lists.ipfire.org Received: from mail01.ipfire.org (mail01.haj.ipfire.org [IPv6:2001:678:b28::25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4c6XY31c4yz2xMP for <development@lists.ipfire.org>; Wed, 20 Aug 2025 16:51:51 +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 RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4c6XY20XjQzWF; Wed, 20 Aug 2025 16:51:50 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1755708710; 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=UkhI+csDNgIfcTNNgcyUJQ+jGYAIFR1YMqZ6YNpnoqg=; b=WD5boPruGXYssvFYa20OjU/6qJq1sdOMwEdH6h029rktU+5MMGEgEppFmBOjU6MbXHg3HG 96r5zWae1MIVPvAA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1755708710; 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=UkhI+csDNgIfcTNNgcyUJQ+jGYAIFR1YMqZ6YNpnoqg=; b=tsisBL9u2wJcUCNQo+zji7cl6woZrg6XB9PcNOpHZ1Z9E9Tz9QZjjRRtIFS6aXexp/I5b6 RG15X+Ytafq7A2LJfkKBQzmueDg9uEa0WtY3murYKgdn7pwiQQZmHn3AW7DvhCpJeUbnmP VfVeHLm6U1UMDGkkShh7x5GScTwzbw+ZtWUqMGJM0LTOOyPmFpDT0re0ESF08lwqg8qVMy Z5pormDwXxa0DU2EqIUuFRDJom+MdDHAAMFUtiGb0qYm14b9PqYIcPtu9mWF1h/LrX51AZ 7w2VRT8/+MnIHgGfMP1/H5Upgz/2HzV3W3jcFk/rzo00EuqucWD/Dea+9ejIuw== From: Adolf Belka <adolf.belka@ipfire.org> To: development@lists.ipfire.org Cc: Adolf Belka <adolf.belka@ipfire.org> Subject: [PATCH] ovpnmain.cgi: Fixes bug13869 - shows values from vpnsettings in advanced server page Date: Wed, 20 Aug 2025 18:51:47 +0200 Message-ID: <20250820165147.21850-1-adolf.belka@ipfire.org> Precedence: list List-Id: <development.lists.ipfire.org> List-Subscribe: <https://lists.ipfire.org/>, <mailto:development+subscribe@lists.ipfire.org?subject=subscribe> List-Unsubscribe: <https://lists.ipfire.org/>, <mailto:development+unsubscribe@lists.ipfire.org?subject=unsubscribe> List-Post: <mailto:development@lists.ipfire.org> List-Help: <mailto:development+help@lists.ipfire.org?subject=help> Sender: <development@lists.ipfire.org> Mail-Followup-To: <development@lists.ipfire.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Action: no action X-Rspamd-Queue-Id: 4c6XY60kN4z5NZ X-Rspamd-Server: mail01.haj.ipfire.org X-Spamd-Result: default: False [-10.78 / 11.00]; BAYES_HAM(-3.00)[99.99%]; DWL_DNSWL_MED(-2.00)[ipfire.org:dkim]; FROM_INTERNAL_BULK_SENDERS(-2.00)[2001:678:b28::201]; R_DKIM_ALLOW(-1.62)[ipfire.org:s=202003ed25519,ipfire.org:s=202003rsa]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM(-1.00)[-1.000]; DKIM_REPUTATION(-0.88)[-0.88241021395428]; DMARC_POLICY_ALLOW_WITH_FAILURES(-0.50)[]; R_MISSING_CHARSET(0.50)[]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; IP_REPUTATION_HAM(-0.29)[asn: 204867(-0.08), country: DE(0.00), ip: 2001:678:b28::(-0.21)]; RCVD_IN_DNSWL_MED(-0.20)[2001:678:b28::25:received]; MAILLIST(-0.18)[generic]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; MX_GOOD(-0.01)[]; RECEIVED_HELO_LOCALHOST(0.00)[]; ARC_SIGNED(0.00)[ipfire.org:s=202003rsa:i=1]; FROM_HAS_DN(0.00)[]; FUZZY_RATELIMITED(0.00)[rspamd.com]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; TAGGED_FROM(0.00)[bounces-824-patchwork=ipfire.org]; RCVD_COUNT_THREE(0.00)[3]; ASN(0.00)[asn:204867, ipnet:2001:678:b28::/48, country:DE]; RCVD_VIA_SMTP_AUTH(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MISSING_XM_UA(0.00)[]; DMARC_POLICY_ALLOW(0.00)[ipfire.org,reject]; DKIM_TRACE(0.00)[ipfire.org:+]; RCVD_TLS_LAST(0.00)[]; FROM_NEQ_ENVFROM(0.00)[adolf.belka@ipfire.org,development@lists.ipfire.org]; R_SPF_SOFTFAIL(0.00)[~all:c] |
Series |
ovpnmain.cgi: Fixes bug13869 - shows values from vpnsettings in advanced server page
|
|
Commit Message
Adolf Belka
20 Aug 2025, 4:51 p.m. UTC
- In the previous version the cgiparams hash was filled from the ovpn/settings file. However with the new version of this file that is no longer done. For the values of protocol, redirect_gw, mssfix, dataciphers, route_push the hash file was changed from %cgiparams to %vpnsettings. This was not done for the values of dciphers, dauth or tlsauth. These values still got their entries from the %cgiparams hash but this hash is empty as it has not been filled. - This patch replaces the use of $cgiparams with $vpnsettings. - Tested this out on my vm testbed and confirmed that the saved values are now shown on the advanced settings wui page. Fixes: bug13869 Tested-by: Adolf Belka <adolf.belka@ipfire.org> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org> --- html/cgi-bin/ovpnmain.cgi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Comments
Hi, I saw that this patch had been accepted and put into next (CU198). I had expected that it would also be put into CU197 Testing as the issue being fixed is part of the openvpn-2.6 changes. Regards, Adolf. On 20/08/2025 18:51, Adolf Belka wrote: > - In the previous version the cgiparams hash was filled from the ovpn/settings file. > However with the new version of this file that is no longer done. For the values > of protocol, redirect_gw, mssfix, dataciphers, route_push the hash file was changed > from %cgiparams to %vpnsettings. This was not done for the values of dciphers, dauth > or tlsauth. These values still got their entries from the %cgiparams hash but this > hash is empty as it has not been filled. > - This patch replaces the use of $cgiparams with $vpnsettings. > - Tested this out on my vm testbed and confirmed that the saved values are now shown on > the advanced settings wui page. > > Fixes: bug13869 > Tested-by: Adolf Belka <adolf.belka@ipfire.org> > Signed-off-by: Adolf Belka <adolf.belka@ipfire.org> > --- > html/cgi-bin/ovpnmain.cgi | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi > index 83f9fdc02..3a85c11ac 100644 > --- a/html/cgi-bin/ovpnmain.cgi > +++ b/html/cgi-bin/ovpnmain.cgi > @@ -2694,18 +2694,18 @@ ADV_ERROR: > $selected{'DCIPHER'}{'CAST5-CBC'} = ''; > $selected{'DCIPHER'}{'BF-CBC'} = ''; > $selected{'DCIPHER'}{'DES-CBC'} = ''; > - $selected{'DCIPHER'}{$cgiparams{'DCIPHER'}} = 'SELECTED'; > + $selected{'DCIPHER'}{$vpnsettings{'DCIPHER'}} = 'SELECTED'; > > $selected{'DAUTH'}{'whirlpool'} = ''; > $selected{'DAUTH'}{'SHA512'} = ''; > $selected{'DAUTH'}{'SHA384'} = ''; > $selected{'DAUTH'}{'SHA256'} = ''; > $selected{'DAUTH'}{'SHA1'} = ''; > - $selected{'DAUTH'}{$cgiparams{'DAUTH'}} = 'SELECTED'; > + $selected{'DAUTH'}{$vpnsettings{'DAUTH'}} = 'SELECTED'; > > $checked{'TLSAUTH'}{'off'} = ''; > $checked{'TLSAUTH'}{'on'} = ''; > - $checked{'TLSAUTH'}{$cgiparams{'TLSAUTH'}} = 'CHECKED'; > + $checked{'TLSAUTH'}{$vpnsettings{'TLSAUTH'}} = 'CHECKED'; > > &Header::showhttpheaders(); > &Header::openpage($Lang::tr{'status ovpn'}, 1, '');
Yes, you are of course right. I did not think. I moved them over and pushed them to master. > On 22 Aug 2025, at 10:45, Adolf Belka <adolf.belka@ipfire.org> wrote: > > Hi, > > I saw that this patch had been accepted and put into next (CU198). I had expected that it would also be put into CU197 Testing as the issue being fixed is part of the openvpn-2.6 changes. > > Regards, > > Adolf. > > > On 20/08/2025 18:51, Adolf Belka wrote: >> - In the previous version the cgiparams hash was filled from the ovpn/settings file. >> However with the new version of this file that is no longer done. For the values >> of protocol, redirect_gw, mssfix, dataciphers, route_push the hash file was changed >> from %cgiparams to %vpnsettings. This was not done for the values of dciphers, dauth >> or tlsauth. These values still got their entries from the %cgiparams hash but this >> hash is empty as it has not been filled. >> - This patch replaces the use of $cgiparams with $vpnsettings. >> - Tested this out on my vm testbed and confirmed that the saved values are now shown on >> the advanced settings wui page. >> Fixes: bug13869 >> Tested-by: Adolf Belka <adolf.belka@ipfire.org> >> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org> >> --- >> html/cgi-bin/ovpnmain.cgi | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi >> index 83f9fdc02..3a85c11ac 100644 >> --- a/html/cgi-bin/ovpnmain.cgi >> +++ b/html/cgi-bin/ovpnmain.cgi >> @@ -2694,18 +2694,18 @@ ADV_ERROR: >> $selected{'DCIPHER'}{'CAST5-CBC'} = ''; >> $selected{'DCIPHER'}{'BF-CBC'} = ''; >> $selected{'DCIPHER'}{'DES-CBC'} = ''; >> - $selected{'DCIPHER'}{$cgiparams{'DCIPHER'}} = 'SELECTED'; >> + $selected{'DCIPHER'}{$vpnsettings{'DCIPHER'}} = 'SELECTED'; >> $selected{'DAUTH'}{'whirlpool'} = ''; >> $selected{'DAUTH'}{'SHA512'} = ''; >> $selected{'DAUTH'}{'SHA384'} = ''; >> $selected{'DAUTH'}{'SHA256'} = ''; >> $selected{'DAUTH'}{'SHA1'} = ''; >> - $selected{'DAUTH'}{$cgiparams{'DAUTH'}} = 'SELECTED'; >> + $selected{'DAUTH'}{$vpnsettings{'DAUTH'}} = 'SELECTED'; >> $checked{'TLSAUTH'}{'off'} = ''; >> $checked{'TLSAUTH'}{'on'} = ''; >> - $checked{'TLSAUTH'}{$cgiparams{'TLSAUTH'}} = 'CHECKED'; >> + $checked{'TLSAUTH'}{$vpnsettings{'TLSAUTH'}} = 'CHECKED'; >> &Header::showhttpheaders(); >> &Header::openpage($Lang::tr{'status ovpn'}, 1, ''); > >
diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi index 83f9fdc02..3a85c11ac 100644 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@ -2694,18 +2694,18 @@ ADV_ERROR: $selected{'DCIPHER'}{'CAST5-CBC'} = ''; $selected{'DCIPHER'}{'BF-CBC'} = ''; $selected{'DCIPHER'}{'DES-CBC'} = ''; - $selected{'DCIPHER'}{$cgiparams{'DCIPHER'}} = 'SELECTED'; + $selected{'DCIPHER'}{$vpnsettings{'DCIPHER'}} = 'SELECTED'; $selected{'DAUTH'}{'whirlpool'} = ''; $selected{'DAUTH'}{'SHA512'} = ''; $selected{'DAUTH'}{'SHA384'} = ''; $selected{'DAUTH'}{'SHA256'} = ''; $selected{'DAUTH'}{'SHA1'} = ''; - $selected{'DAUTH'}{$cgiparams{'DAUTH'}} = 'SELECTED'; + $selected{'DAUTH'}{$vpnsettings{'DAUTH'}} = 'SELECTED'; $checked{'TLSAUTH'}{'off'} = ''; $checked{'TLSAUTH'}{'on'} = ''; - $checked{'TLSAUTH'}{$cgiparams{'TLSAUTH'}} = 'CHECKED'; + $checked{'TLSAUTH'}{$vpnsettings{'TLSAUTH'}} = 'CHECKED'; &Header::showhttpheaders(); &Header::openpage($Lang::tr{'status ovpn'}, 1, '');