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 about 1 year ago
- File Firewall_ NAT_ 1_1.jpg Firewall_ NAT_ 1_1.jpg added
Updated by Lev Prokofev about 1 year 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 about 1 year 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 about 1 year ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset 1db73de1b1014af5bb267c48c711d9917364b9aa.
Updated by Lev Prokofev about 1 year 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 about 1 year 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 Marcos M about 1 year ago
- Status changed from Feedback to In Progress
- Assignee changed from Jim Pingle to Marcos M
Updated by Marcos M about 1 year ago
- Status changed from In Progress to Feedback
The issues noted in #note-6 occur when the IP address is also a VIP.
Applied in changeset 77ba34495de9cde375c589a85a420af242833efa.
Updated by Danilo Zrenjanin about 1 year ago
- Status changed from Feedback to Resolved
Tested against:
23.09.b.20231013.0600
Everything works as expected.
I am marking this case resolved.
Updated by Jim Pingle about 1 year ago
- Target version changed from 2.8.0 to 2.7.1