diff options
author | jim-p <jimp@pfsense.org> | 2011-02-26 14:20:00 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-02-26 14:20:00 -0500 |
commit | 4ed69f3394a336c2fe6c8fa81741e55036bd70b7 (patch) | |
tree | afe5a0c8a8f06cc118b0b21f2468c74a5492cf34 /usr/local | |
parent | 153e3cb5abe3d096cb325b3d126d90b4130675ef (diff) | |
download | pfsense-4ed69f3394a336c2fe6c8fa81741e55036bd70b7.zip pfsense-4ed69f3394a336c2fe6c8fa81741e55036bd70b7.tar.gz |
Do a more strict check on the return value of the download function. Fixes #1309
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/system_firmware_check.php | 2 | ||||
-rw-r--r-- | usr/local/www/widgets/widgets/system_information.widget.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/usr/local/www/system_firmware_check.php b/usr/local/www/system_firmware_check.php index 266a149..25d3095 100755 --- a/usr/local/www/system_firmware_check.php +++ b/usr/local/www/system_firmware_check.php @@ -131,7 +131,7 @@ if ($g['platform'] == "nanobsd") { $nanosize .= strtolower(trim(file_get_contents("/etc/nanosize.txt"))); } -if(download_file_with_progress_bar("{$updater_url}/version{$nanosize}", "/tmp/{$g['product_name']}_version", 'read_body', 5, 5)) +if(download_file_with_progress_bar("{$updater_url}/version{$nanosize}", "/tmp/{$g['product_name']}_version", 'read_body', 5, 5) === true) $remote_version = trim(@file_get_contents("/tmp/{$g['product_name']}_version")); $static_text .= gettext("done") . "\\n"; if (!$remote_version) { diff --git a/usr/local/www/widgets/widgets/system_information.widget.php b/usr/local/www/widgets/widgets/system_information.widget.php index 3de2ab1..e1e4645 100644 --- a/usr/local/www/widgets/widgets/system_information.widget.php +++ b/usr/local/www/widgets/widgets/system_information.widget.php @@ -49,7 +49,7 @@ if($_REQUEST['getupdatestatus']) { } @unlink("/tmp/{$g['product_name']}_version"); - if (download_file_with_progress_bar("{$updater_url}/version{$nanosize}", "/tmp/{$g['product_name']}_version", 'read_body', 5, 5)) + if (download_file_with_progress_bar("{$updater_url}/version{$nanosize}", "/tmp/{$g['product_name']}_version", 'read_body', 5, 5) === true) $remote_version = trim(@file_get_contents("/tmp/{$g['product_name']}_version")); if(empty($remote_version)) |