Regression #14267
closed
PHP error when saving an ICMP firewall rule with no subtypes selected
Added by Marcos M over 1 year ago.
Updated over 1 year ago.
Plus Target Version:
23.05
Affected Architecture:
All
Description
pfSense+ 23.01
Trying to edit an auto-generated NAT-associated firewall rule to allow ICMP results in a PHP error:
PHP ERROR: Type: 1, File: /usr/local/www/firewall_rules_edit.php, Line: 485, Message: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /usr/local/www/firewall_rules_edit.php:485
Files
- Tracker changed from Bug to Regression
- Subject changed from PHP error with firewall rules to PHP error when saving an ICMP firewall rule with no subtypes selected
- Status changed from New to Confirmed
- Assignee set to Jim Pingle
- Target version set to 2.7.0
- Plus Target Version set to 23.05
A couple notes:
- The error happens when trying to save, not when loading the page
- The error is specific to ICMP
- It isn't specific to auto-associated rules from NAT, you can induce the same error by making an ICMP rule manually and removing all selections from the ICMP subtype box (which has 'any' selected by default)
- Also appears to possibly cause a filter reload error: "Unresolvable destination port alias '-0' for rule 'NAT Test NAT ICMP' @ 2023-04-11 12:53:18"
- Status changed from Confirmed to Feedback
- % Done changed from 0 to 100
- Status changed from Feedback to Resolved
The patch fixes it.
I tested the patch against the following release:
23.01-RELEASE (amd64)
built on Fri Feb 10 20:06:33 UTC 2023
FreeBSD 14.0-CURRENT
I am marking this ticket resolved.
Also available in: Atom
PDF