Project

General

Profile

Actions

Regression #13661

closed

Feature #13446: Upgrade PHP from 7.4 to 8.1

Input validation issues on firewall_shaper.php

Added by Reid Linnemann about 2 years ago. Updated almost 2 years ago.

Status:
Resolved
Priority:
Normal
Category:
Traffic Shaper (ALTQ)
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
23.01
Release Notes:
Force Exclusion
Affected Version:
Affected Architecture:

Description

On the firewall_shaper.php page, when I create a new shaper without setting a bandwidth I see this error:

Fatal error: Uncaught TypeError: Unsupported operand types: string * int in /etc/inc/shaper.inc:762
Stack trace:
#0 /etc/inc/shaper.inc(809): altq_root_queue->CheckBandwidth('', 'Mb')
#1 /usr/local/www/firewall_shaper.php(219): altq_root_queue->validate_input(Array, Array)
#2 {main}
  thrown in /etc/inc/shaper.inc on line 762
PHP ERROR: Type: 1, File: /etc/inc/shaper.inc, Line: 762, Message: Uncaught TypeError: Unsupported operand types: string * int in /etc/inc/shaper.inc:762
Stack trace:
#0 /etc/inc/shaper.inc(809): altq_root_queue->CheckBandwidth('', 'Mb')
#1 /usr/local/www/firewall_shaper.php(219): altq_root_queue->validate_input(Array, Array)
#2 {main}
  thrown

Also, on the same page it is not possible to create one with CODELQ, as it both requires and disallows Qlimit in that case.

Actions #1

Updated by Reid Linnemann about 2 years ago

  • Description updated (diff)
Actions #2

Updated by Reid Linnemann about 2 years ago

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

Updated by Jim Pingle almost 2 years ago

  • Release Notes changed from Default to Force Exclusion
  • Tracker changed from Bug to Regression
Actions #4

Updated by Danilo Zrenjanin almost 2 years ago

  • Status changed from Feedback to Resolved

Tested against:

23.01-DEVELOPMENT (amd64)
built on Fri Dec 09 06:12:49 UTC 2022
FreeBSD 14.0-CURRENT

There were no PHP errors when I defined a new shaper without setting a bandwidth. The warning text appeared as expected:

The following input errors were detected:

Bandwidth must be set. This is usually the interface speed.
Actions

Also available in: Atom PDF