Project

General

Profile

« Previous | Next » 

Revision db0cdbc8

Added by Jim Pingle about 3 years ago

Skip URL tables with invalid names. Fixes #13425

View differences:

src/etc/inc/pfsense-utils.inc
2632 2632
function process_alias_urltable($name, $type, $url, $freq, $forceupdate=false, $validateonly=false) {
2633 2633
	global $g, $config;
2634 2634

  
2635
	if (!is_validaliasname($name) || !isURL($url)) {
2636
		return false;
2637
	}
2638

  
2635 2639
	$urltable_prefix = "/var/db/aliastables/";
2636
	$urltable_filename = $urltable_prefix . $name . ".txt";
2640
	$urltable_filename = $urltable_prefix . basename($name) . ".txt";
2637 2641
	$tmp_urltable_filename = $urltable_filename . ".tmp";
2638 2642

  
2639 2643
	// Make the aliases directory if it doesn't exist
src/usr/local/pfSense/include/www/alias-utils.inc
310 310
			}
311 311
	}
312 312

  
313
	if ($data_errors) {
314
		$data_errors[] = gettext("There may be additional errors. Fix the noted problems and try again.");
315
	}
313 316
	$alias = array();
314 317
	$address = array();
315 318
	$final_address_details = array();
......
320 323
		$address = array();
321 324

  
322 325
		/* item is a url table type */
323
		if ($post['address0']) {
326
		if ($post['address0'] && empty($data_errors)) {
324 327
			/* fetch down and add in */
325 328
			$address[] = $post['address0'];
326 329
			$alias['url'] = $post['address0'];

Also available in: Unified diff