]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - html/cgi-bin/vpnmain.cgi
vpnmain.cgi+ovpnmain.cgi: Fix file upload with new versions of Perl
[ipfire-2.x.git] / html / cgi-bin / vpnmain.cgi
index 1cd7cb84b3c81e44fc3dbd609acae2b358bf17e6..33b504bc9b710170eb449f8f13babb03927e0f20 100644 (file)
@@ -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;
                }