From: Arne Fitzenreiter Date: Fri, 20 Dec 2024 06:51:05 +0000 (+0100) Subject: Revert "vpnmain.cgi: Fix for 2nd part of bug10595" X-Git-Tag: v2.29-core191~14^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=754451021b7d6fa6aa812b1ac2f017fb118bd383;p=ipfire-2.x.git Revert "vpnmain.cgi: Fix for 2nd part of bug10595" This reverts commit 7b29acfbb597b89837dcbe1b91ef6ef4352f28a6. --- diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi old mode 100644 new mode 100755 index 694eeed762..3541aaa293 --- a/html/cgi-bin/vpnmain.cgi +++ b/html/cgi-bin/vpnmain.cgi @@ -245,7 +245,7 @@ sub callssl ($) { ### sub getCNfromcert ($) { #&General::log("ipsec", "Extracting name from $_[0]..."); - my $temp = `/usr/bin/openssl x509 -text -in '$_[0]'`; + my $temp = `/usr/bin/openssl x509 -text -in $_[0]`; $temp =~ /Subject:.*CN\s*=\s*(.*)[\n]/; $temp = $1; $temp =~ s+/Email+, E+; @@ -259,7 +259,7 @@ sub getCNfromcert ($) { ### sub getsubjectfromcert ($) { #&General::log("ipsec", "Extracting subject from $_[0]..."); - my $temp = `/usr/bin/openssl x509 -text -in '$_[0]'`; + my $temp = `/usr/bin/openssl x509 -text -in $_[0]`; $temp =~ /Subject: (.*)[\n]/; $temp = $1; $temp =~ s+/Email+, E+; @@ -644,8 +644,8 @@ END } elsif ($cgiparams{'ACTION'} eq $Lang::tr{'upload ca certificate'}) { &General::readhasharray("${General::swroot}/vpn/caconfig", \%cahash); - if ($cgiparams{'CA_NAME'} !~ /^[a-zA-Z0-9 ]*$/) { - $errormessage = $Lang::tr{'ca name must only contain characters or spaces'}; + if ($cgiparams{'CA_NAME'} !~ /^[a-zA-Z0-9]+$/) { + $errormessage = $Lang::tr{'name must only contain characters'}; goto UPLOADCA_ERROR; }