Project

General

Profile

Actions

Regression #14338

closed

PHP error from empty separator

Added by Jim Pingle 12 months ago. Updated 11 months 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:

Description

If the configuration contains an empty separator entry, it can lead to a PHP error:

         <separator>
             <floatingrules></floatingrules>
            <wan>
                <sep0></sep0>
            </wan>
             <lan></lan>
         </separator>

Loading the firewall rules produces the following error:

PHP ERROR: Type: 1, File: /etc/inc/filter.inc, Line: 4777, Message: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/filter.inc:4777
Stack trace:
#0 /usr/local/www/firewall_rules.php(566): separator_rows(Array)
#1 {main}
thrown @ 2023-05-02 19:51:14

To me, seems to only need a few small PHP 8.x changes. Already have a tested and working fix ready.

Actions #1

Updated by Jim Pingle 12 months ago

  • Status changed from In Progress to Feedback
  • % Done changed from 0 to 100
Actions #2

Updated by Jim Pingle 12 months ago

  • Status changed from Feedback to Resolved

Confirmed resolved on current snapshots.

Actions #3

Updated by Jim Pingle 11 months ago

  • Affected Version set to 2.7.0
Actions

Also available in: Atom PDF