diff options
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/system_firmware.php | 6 |
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 */ |