mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-05-05 03:18:00 +02:00
vpnmain.cgi+ovpnmain.cgi: Fix file upload with new versions of Perl
File uploads did not work since Perl was upgraded. This patch fixes that problem by only checking if an object was returned instead of performing a string comparison. Signed-off-by: Michael Tremer <michael.tremer@ipfire.org> Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
committed by
Arne Fitzenreiter
parent
0fb42e01c5
commit
2ad1b18bdb
@@ -604,7 +604,7 @@ END
|
||||
}
|
||||
}
|
||||
|
||||
if (ref ($cgiparams{'FH'}) ne 'Fh') {
|
||||
unless (ref ($cgiparams{'FH'})) {
|
||||
$errormessage = $Lang::tr{'there was no file upload'};
|
||||
goto UPLOADCA_ERROR;
|
||||
}
|
||||
@@ -830,7 +830,7 @@ END
|
||||
} elsif ($cgiparams{'ACTION'} eq $Lang::tr{'upload p12 file'}) {
|
||||
&General::log("ipsec", "Importing from p12...");
|
||||
|
||||
if (ref ($cgiparams{'FH'}) ne 'Fh') {
|
||||
unless (ref ($cgiparams{'FH'})) {
|
||||
$errormessage = $Lang::tr{'there was no file upload'};
|
||||
goto ROOTCERT_ERROR;
|
||||
}
|
||||
@@ -1531,7 +1531,7 @@ END
|
||||
$errormessage = $Lang::tr{'cant change certificates'};
|
||||
goto VPNCONF_ERROR;
|
||||
}
|
||||
if (ref ($cgiparams{'FH'}) ne 'Fh') {
|
||||
unless (ref ($cgiparams{'FH'})) {
|
||||
$errormessage = $Lang::tr{'there was no file upload'};
|
||||
goto VPNCONF_ERROR;
|
||||
}
|
||||
@@ -1568,7 +1568,7 @@ END
|
||||
} elsif ($cgiparams{'AUTH'} eq 'pkcs12') {
|
||||
&General::log("ipsec", "Importing from p12...");
|
||||
|
||||
if (ref ($cgiparams{'FH'}) ne 'Fh') {
|
||||
unless (ref ($cgiparams{'FH'})) {
|
||||
$errormessage = $Lang::tr{'there was no file upload'};
|
||||
goto ROOTCERT_ERROR;
|
||||
}
|
||||
@@ -1658,7 +1658,7 @@ END
|
||||
$errormessage = $Lang::tr{'cant change certificates'};
|
||||
goto VPNCONF_ERROR;
|
||||
}
|
||||
if (ref ($cgiparams{'FH'}) ne 'Fh') {
|
||||
unless (ref ($cgiparams{'FH'})) {
|
||||
$errormessage = $Lang::tr{'there was no file upload'};
|
||||
goto VPNCONF_ERROR;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user