Bug #7059
firewall_rules_edit.php - strlen error when there are input errors
Start date:
12/31/2016
Due date:
% Done:
100%
Estimated time:
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
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
#1
Updated by Phillip Davis almost 3 years ago
#2
Updated by Renato Botelho almost 3 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
PR has been merged
#3
Updated by Jim Pingle almost 3 years ago
- Status changed from Feedback to Resolved
Looks good, no more strlen error.
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.