summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@su.local>2009-09-10 18:24:57 -0400
committerScott Ullrich <sullrich@su.local>2009-09-10 18:24:57 -0400
commit4fa1b0139a63c1a7747f3456f69cc740e1c23232 (patch)
tree5248b9e486d73c505e4bd0518f16618793150e8f /usr/local/www
parentb6ef36e897fb262cffa69953337fb5f66964e630 (diff)
downloadpfsense-4fa1b0139a63c1a7747f3456f69cc740e1c23232.zip
pfsense-4fa1b0139a63c1a7747f3456f69cc740e1c23232.tar.gz
Use ['name'] instead of ['tmp_name']
Diffstat (limited to 'usr/local/www')
-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 522893f..d5d696b 100755
--- a/usr/local/www/system_firmware.php
+++ b/usr/local/www/system_firmware.php
@@ -49,10 +49,10 @@ require_once("xmlrpc_client.inc");
ini_set('max_execution_time', '3600');
ini_set('max_input_time', '3600');
-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;
@@ -114,7 +114,7 @@ if ($_POST && !file_exists($d_firmwarelock_path)) {
} else if ($mode == "upgrade") {
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