Project

General

Profile

Bug #7059

firewall_rules_edit.php - strlen error when there are input errors

Added by Jim Pingle 12 months ago. Updated 12 months ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
Rules/NAT
Target version:
Start date:
12/31/2016
Due date:
% Done:

100%

Affected Version:
2.4
Affected Architecture:

Description

Craft an invalid firewall rule, such as one set for IPv4 with an IPv6 src/dst, and when the input errors are displayed there is also a PHP error:

Warning: strlen() expects parameter 1 to be string, array given in /usr/local/www/firewall_rules_edit.php on line 1288 Call Stack: 0.0001 254816 1. {main}() /usr/local/www/firewall_rules_edit.php:0 0.4134 2340744 2. strlen() /usr/local/www/firewall_rules_edit.php:1288 

Associated revisions

Revision 23057964
Added by Phillip Davis 12 months 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.

Revision fafdd8f0
Added by Phillip Davis 12 months 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)

History

#2 Updated by Renato Botelho 12 months ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

PR has been merged

#3 Updated by Jim Pingle 12 months ago

  • Status changed from Feedback to Resolved

Looks good, no more strlen error.

Also available in: Atom PDF