ovpnmain.cgi: Apply default settings when neccessary

Message ID 20250819183916.5083-1-stefan.schantl@ipfire.org
State Staged
Commit 77f1c6dc3999d2174079bf57f1a6078c5e74f7ab
Headers
Series ovpnmain.cgi: Apply default settings when neccessary |

Commit Message

Stefan Schantl 19 Aug 2025, 6:39 p.m. UTC
Only apply the default settings in case nothing has been configured yet,
otherwise existing settings may get overwritten.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
 html/cgi-bin/ovpnmain.cgi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi
index 83f9fdc02..a2f95dc9a 100644
--- a/html/cgi-bin/ovpnmain.cgi
+++ b/html/cgi-bin/ovpnmain.cgi
@@ -132,7 +132,7 @@  my $col="";
 	"MAX_CLIENTS"  => 100,
 	"MSSFIX"       => "off",
 	"TLSAUTH"      => "on",
-});
+}) unless (%vpnsettings);
 
 # Load CGI parameters
 &Header::getcgihash(\%cgiparams, {'wantfile' => 1, 'filevar' => 'FH'});