Project

General

Profile

« Previous | Next » 

Revision fafdd8f0

Added by Phil Davis over 8 years ago

Fix #7059 Set expected icmptypes format

icmptype is a comma-separated list in the config. When attempting to save, the array in $_POST['icmptype'] needs to be put into this format in $pconfig in case there are input errors and the user-entered data need to be re-displayed for correction.
(cherry picked from commit 23057964d81019e8ed3adc944c77ca8a1a9c178f)

View differences:

src/usr/local/www/firewall_rules_edit.php
460 460

  
461 461
	$pconfig = $_POST;
462 462

  
463
	if (($_POST['proto'] == "icmp") && count($_POST['icmptype'])) {
464
		$pconfig['icmptype'] = implode(',', $_POST['icmptype']);
465
	} else {
466
		unset($pconfig['icmptype']);
467
	}
468

  
463 469
	/* input validation */
464 470
	$reqdfields = explode(" ", "type proto");
465 471
	if (isset($a_filter[$id]['associated-rule-id']) === false) {

Also available in: Unified diff