Project

General

Profile

« Previous | Next » 

Revision 69769bcc

Added by Scott Ullrich about 16 years ago

Check $_FILES['ulfile']['name'] and not ['tmpname'] since it will not tell us
the original uploaded file name. Duhhhhhh.

View differences:

usr/local/www/system_firmware.php
137 137
                            /* fire up the update script in the background */
138 138
                            touch($d_firmwarelock_path);
139 139
                            $savemsg = "The firmware is now being updated. The firewall will reboot automatically.";
140
							if(stristr($_FILES['ulfile']['tmp_name'],"nanobsd"))
140
							if(stristr($_FILES['ulfile']['name'],"nanobsd"))
141 141
								mwexec_bg("/etc/rc.firmware pfSenseNanoBSDupgrade {$g['upload_path']}/firmware.tgz");
142
							else if(stristr($_FILES['ulfile']['tmp_name'],"bdiff"))
142
							else if(stristr($_FILES['ulfile']['name'],"bdiff"))
143 143
                            	mwexec_bg("/etc/rc.firmware delta_update {$g['upload_path']}/firmware.tgz");
144 144
							else 
145 145
								mwexec_bg("/etc/rc.firmware pfSenseupgrade {$g['upload_path']}/firmware.tgz");

Also available in: Unified diff