summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_firmware.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@su.local>2009-09-10 18:22:49 -0400
committerScott Ullrich <sullrich@su.local>2009-09-10 18:26:17 -0400
commitd2d86ca3a71515aef81edb1abb26109584c4b0d1 (patch)
tree62e5dbf8933abd46746c598e38c7aebaa2639bc8 /usr/local/www/system_firmware.php
parent6f8662b948dd176534b4af836e147401d33e5ee1 (diff)
downloadpfsense-d2d86ca3a71515aef81edb1abb26109584c4b0d1.zip
pfsense-d2d86ca3a71515aef81edb1abb26109584c4b0d1.tar.gz
Use ['name'] instead of ['tmp_name']
Diffstat (limited to 'usr/local/www/system_firmware.php')
-rwxr-xr-xusr/local/www/system_firmware.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/local/www/system_firmware.php b/usr/local/www/system_firmware.php
index bf0b92f..0955efc 100755
--- a/usr/local/www/system_firmware.php
+++ b/usr/local/www/system_firmware.php
@@ -50,10 +50,10 @@ require_once("xmlrpc_client.inc");
ini_set('max_execution_time', '9999');
ini_set('max_input_time', '9999');
-function file_is_for_platform($filename) {
+function file_is_for_platform($filename, $ul_name) {
global $g;
if($g['platform'] == "nanobsd") {
- if(stristr($filename, "nanobsd"))
+ if(stristr($ul_name, "nanobsd"))
return true;
else
return false;
@@ -140,7 +140,7 @@ if ($_POST && !is_subsystem_dirty('firmwarelock')) {
$errortext = "(" . file_upload_error_message($_FILES['ulfile']['error']) . ")";
if (is_uploaded_file($_FILES['ulfile']['tmp_name'])) {
/* verify firmware image(s) */
- if (file_is_for_platform($_FILES['ulfile']['tmp_name']) == false && !$_POST['sig_override'])
+ if (file_is_for_platform($_FILES['ulfile']['tmp_name'], $_FILES['ulfile']['name']) == false && !$_POST['sig_override'])
$input_errors[] = "The uploaded image file is not for this platform ({$g['platform']}).";
else if (!file_exists($_FILES['ulfile']['tmp_name'])) {
/* probably out of memory for the MFS */
OpenPOWER on IntegriCloud