Project

General

Profile

Actions

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.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Rules / NAT
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
23.05
Release Notes:
Default
Affected Version:
2.7.0
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

relevant_config.xml (2.94 KB) relevant_config.xml Marcos M, 04/10/2023 08:26 PM
Actions #2

Updated by Jim Pingle over 1 year ago

  • 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"
Actions #3

Updated by Jim Pingle over 1 year ago

  • Status changed from Confirmed to Feedback
  • % Done changed from 0 to 100
Actions #4

Updated by Danilo Zrenjanin over 1 year ago

  • 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.

Actions

Also available in: Atom PDF