]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
ovpnmain.cgi: Accept empty input for ENABLED
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 19 Jun 2025 14:49:22 +0000 (16:49 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 15 Jul 2025 09:39:08 +0000 (09:39 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/ovpnmain.cgi

index 2b4e2a4256a36eb3971ce66b8be267caf1885c92..58a3211753c7e182485a6c82159c9a2f83985ad4 100644 (file)
@@ -1391,7 +1391,7 @@ if ($cgiparams{'ACTION'} eq $Lang::tr{'save'} && $cgiparams{'TYPE'} eq '' && $cg
     if ($errormessage ne ''){
        goto SETTINGS_ERROR;
     }
-    if ($cgiparams{'ENABLED'} !~ /^(on|off)$/) {
+    if ($cgiparams{'ENABLED'} !~ /^(on|off|)$/) {
         $errormessage = $Lang::tr{'invalid input'};
         goto SETTINGS_ERROR;
     }