]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
OpenVPN: Prevent internal server error cause of bad header wrapper
authorErik Kapfer <erik.kapfer@ipfire.org>
Thu, 21 Jun 2018 09:12:53 +0000 (11:12 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 3 Jul 2018 09:34:29 +0000 (10:34 +0100)
This fixes #11772 .

If the X509 are deleted, the openvpnctrl output generates a bad header wrapper error from the CGI
which causes an internal server error. The redirection of the openvpnctrl output fixes this.

Signed-off-by: Erik Kapfer <erik.kapfer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/ovpnmain.cgi

index 4bc3473abf024364c808f30fa5ccda09fc790a78..5cd19a0f38f564c54e672814e0b5918134889b17 100644 (file)
@@ -1181,7 +1181,7 @@ SETTINGS_ERROR:
            delete $confighash{$cgiparams{'$key'}};
        }
 
-       system ("/usr/local/bin/openvpnctrl -drrd $name");
+       system ("/usr/local/bin/openvpnctrl -drrd $name &>/dev/null");
     }
     while ($file = glob("${General::swroot}/ovpn/ca/*")) {
        unlink $file;