Regression #14845
closedPHP error in 1:1 NAT rule list when a 1:1 NAT rule uses an interface macro for the external address
100%
Description
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/guiconfig.inc:408 Stack trace: #0 /usr/local/www/firewall_nat_1to1.php(154): pprint_address('wanip') #1 {main} thrown in /usr/local/www/guiconfig.inc on line 408 PHP ERROR: Type: 1, File: /usr/local/www/guiconfig.inc, Line: 408, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/guiconfig.inc:408 Stack trace: #0 /usr/local/www/firewall_nat_1to1.php(154): pprint_address('wanip') #1 {main} thrown
Files
Updated by yon Liu 11 months ago
- File Firewall_ NAT_ 1_1.jpg Firewall_ NAT_ 1_1.jpg added
Updated by Lev Prokofev 11 months ago
Can confirm this bug,
tested on
23.09-DEVELOPMENT (amd64) built on Thu Oct 5 6:00:00 UTC 2023 FreeBSD 14.0-CURRENT
Steps to reproduce:
Create NAT 1:1
Save the settings
Result:
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/guiconfig.inc:408 Stack trace: #0 /usr/local/www/firewall_nat_1to1.php(154): pprint_address('10.150.100.25') #1 {main} thrown in /usr/local/www/guiconfig.inc on line 408 PHP ERROR: Type: 1, File: /usr/local/www/guiconfig.inc, Line: 408, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/guiconfig.inc:408 Stack trace: #0 /usr/local/www/firewall_nat_1to1.php(154): pprint_address('10.150.100.25') #1 {main} thrown
Updated by Jim Pingle 11 months ago
- Tracker changed from Bug to Regression
- Project changed from pfSense Plus to pfSense
- Subject changed from firewall_nat_1to1 to PHP error in 1:1 NAT rule list when a 1:1 NAT rule uses an interface macro for the external address
- Category changed from Unknown to Rules / NAT
- Target version set to 2.8.0
- Release Notes changed from Default to Force Exclusion
- Plus Target Version set to 23.09
Updated by Jim Pingle 11 months ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset 1db73de1b1014af5bb267c48c711d9917364b9aa.
Updated by Lev Prokofev 11 months ago
- File clipboard-202310071002-sjgi5.png clipboard-202310071002-sjgi5.png added
- File clipboard-202310071003-mg09o.png clipboard-202310071003-mg09o.png added
The patch is working, however, I noticed two issues
1) Brackets after external IP
2) When you try to edit a rule the external IP disappears
tested on
23.09-DEVELOPMENT (amd64)
built on Thu Oct 5 6:00:00 UTC 2023
FreeBSD 14.0-CURRENT
Updated by Jim Pingle 10 months ago
I am not seeing either of those behaviors here on the latest snapshot or a patched system. I can edit a rule and the existing address is in place, and I see no parenthesis after the address. I tried on both Plus and CE, same experience on both.
Updated by Danilo Zrenjanin 10 months ago
- Status changed from Feedback to Resolved
Tested against:
23.09.b.20231013.0600
Everything works as expected.
I am marking this case resolved.