Project

General

Profile

« Previous | Next » 

Revision 76590ffe

Added by Renato Botelho about 12 years ago

Use download_file() and check ssl certificates

View differences:

usr/local/www/firewall_aliases_edit.php
201 201
				$isfirst = 0;
202 202
				$temp_filename = tempnam("{$g['tmp_path']}/", "alias_import");
203 203
				unlink($temp_filename);
204
				$verify_ssl = isset($config['system']['checkaliasesurlcert']);
204 205
				mwexec("/bin/mkdir -p {$temp_filename}");
205
				mwexec("/usr/bin/fetch -q -o \"{$temp_filename}/aliases\" \"" . $_POST['address' . $x] . "\"");
206
				download_file($_POST['address' . $x], $temp_filename . "/aliases", $verify_ssl);
207

  
206 208
				/* if the item is tar gzipped then extract */
207 209
				if(stristr($_POST['address' . $x], ".tgz"))
208 210
					process_alias_tgz($temp_filename);

Also available in: Unified diff