Project

General

Profile

Actions

Bug #13515

closed
BM

pfSense - Feature #13446: Upgrade PHP from 7.4 to 8.1

Snort with PHP 8.1 - TypeError when saving edits to an interface

Bug #13515: Snort with PHP 8.1 - TypeError when saving edits to an interface

Added by Bill Meeks almost 4 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Snort
Target version:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Affected Version:
2.7.0
Affected Plus Version:
23.01
Affected Architecture:
All

Description

Testing the Snort package with the September 22, 2022 snapshot of "PHP 8.1 and FreeBSD Main" in a VMware virtual machine.

The following PHP type error is thrown when adding/editing a Snort interface:

amd64
14.0-CURRENT
FreeBSD 14.0-CURRENT #0 devel-main-n255797-d8d104eec65: Thu Sep 22 18:54:16 UTC 2022     root@freebsd:/var/jenkins/workspace/pfSense-CE-snapshots-master-main/obj/amd64/YVYTCXmQ/var/jenkins/workspace/pfSense-CE-snapshots-master-main/sources/FreeBSD-src-dev

Crash report details:

PHP Errors:
[24-Sep-2022 10:05:24 America/New_York] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/snort/snort.inc:4345
Stack trace:
#0 /usr/local/pkg/snort/snort.inc(505): snort_get_vpns_list()
#1 /usr/local/pkg/snort/snort_generate_conf.php(32): snort_build_list(Array, 'default')
#2 /usr/local/pkg/snort/snort.inc(3834): include('/usr/local/pkg/...')
#3 /usr/local/pkg/snort/snort.inc(1023): snort_generate_conf(Array)
#4 /usr/local/www/snort/snort_interfaces_edit.php(522): sync_snort_package_config()
#5 {main}
  thrown in /usr/local/pkg/snort/snort.inc on line 4345

Documenting bug here, and I will also add it to my private TODO list for Snort remediations against PHP 8.1.

BM Updated by Bill Meeks almost 4 years ago Actions #1

This issue has been resolved in the latest Snort GUI package pull request posted here for review and merge: [https://github.com/pfsense/FreeBSD-ports/pull/1191]. When the Pull Request is merged, this issue can be marked RESOLVED.

KP Updated by Kris Phillips almost 4 years ago Actions #2

  • Status changed from New to Confirmed

Tested on September 30th builds of CE. Doesn't appear this has been merged as the error is still present.

BM Updated by Bill Meeks almost 4 years ago Actions #3

The request is being reviewed by Jim Pingle and is not yet merged.

JP Updated by Jim Pingle almost 4 years ago Actions #4

  • Affected Plus Version changed from 22.11 to 23.01

BM Updated by Bill Meeks almost 4 years ago Actions #5

This issue has been resolved with the merging of Pull Request 1191 as detailed here: https://github.com/pfsense/FreeBSD-ports/pull/1191.

JP Updated by Jim Pingle almost 4 years ago Actions #6

  • Status changed from Confirmed to Resolved

JP Updated by Jim Pingle almost 4 years ago Actions #7

  • Parent task set to #13446

JP Updated by Jim Pingle almost 4 years ago Actions #8

  • % Done changed from 0 to 100

JT Updated by Jove Too about 3 years ago Actions #10

I am still seeing this error in 2.7.0-RELEASE.

22:53:08 Bootup complete
22:53:08 PHP ERROR: Type: 1, File: /usr/local/pkg/snort/snort.inc, Line: 4345, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/snort/snort.inc:4345
Stack trace:
#0 /usr/local/pkg/snort/snort.inc(505): snort_get_vpns_list()
#1 /usr/local/pkg/snort/snort_generate_conf.php(32): snort_build_list(Array, 'default')
#2 /usr/local/pkg/snort/snort.inc(3834): include('/usr/local/pkg/...')
#3 /usr/local/pkg/snort/snort.inc(1023): snort_generate_conf(Array)
#4 /etc/inc/pkg-utils.inc(709) : eval()'d code(1): sync_snort_package_config()
#5 /etc/inc/pkg-utils.inc(709): eval()
#6 /etc/rc.start_packages(66): sync_package('snort')
#7 {main}
  thrown

Actions

Also available in: Atom