Project

General

Profile

Actions

Bug #15988

closed

PHP error when saving System Log settings

Bug #15988: PHP error when saving System Log settings

Added by aleksei prokofiev over 1 year ago. Updated about 1 year ago.

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

100%

Estimated time:
Plus Target Version:
25.07
Release Notes:
Default
Affected Version:
Affected Architecture:
All

Description

Tested on
24.11-RELEASE (amd64)
built on Wed Nov 27 18:22:00 UTC 2024
FreeBSD 15.0-CURRENT

Steps to reproduce
1. Go to Status->System Logs->Firewall
2. Click wrench icon in toolbar to Manage Log
3. Ucheck "Log firewall default blocks blok" and save
4. Then go back Status->System Logs->Firewall-> manage log and press save without any changes, you will get crash 50x Error

Crash report begins. Anonymous machine information:

amd64
15.0-CURRENT
FreeBSD 15.0-CURRENT #0 plus-RELENG_24_11-n256407-1bbb3194162: Fri Nov 22 05:08:46 UTC 2024 root@freebsd:/var/jenkins/workspace/pfSense-Plus-snapshots-24_11-main/obj/amd64/AKWlAIiM/var/jenkins/workspace/pfSense-Plus-snapshots-24_11-main/sources/FreeBS

Crash report details:

PHP Errors:
[13-Jan-2025 05:06:19 Etc/UTC] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/status_logs_common.inc:721
Stack trace:
#0 /usr/local/www/status_logs_filter.php(97): manage_log_code()
#1 {main}
thrown in /usr/local/www/status_logs_common.inc on line 721
[13-Jan-2025 05:07:59 Etc/UTC] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/status_logs_common.inc:721

Updated by aleksei prokofiev over 1 year ago Actions #1

  • Subject changed from PHP error after ucheck "Log firewall default blocks blok" in System logs to PHP error after uncheck "Log firewall default blocks blok" in System logs

Updated by Azamat Khakimyanov over 1 year ago Actions #2

  • Status changed from New to Confirmed

Tested on 24.11

I can reproduce this Bug.

And it's interesting but on 25.03-BETA (built on Wed Jan 8 1:56:00 UTC 2025) it's impossible to uncheck 'Log firewall default blocks block' option in Status->System Logs->Firewall-> Manage log. 'The following input errors were detected: Shouldn't be here' error is generated.

But disabling this option in Status->System Logs->Settings works without any errors.

Updated by Jim Pingle over 1 year ago Actions #3

  • Assignee set to Jim Pingle
  • Target version set to 2.8.0
  • Plus Target Version changed from 24.11 to 25.03

Updated by Jim Pingle over 1 year ago Actions #4

I pushed a fix for the PHP error on this, that other message was a leftover debug print from #15874 and I removed it.

Updated by Jim Pingle over 1 year ago Actions #5

  • Status changed from Confirmed to Feedback
  • % Done changed from 0 to 100

Applied in changeset commit:48b2525bae3addc43e99444869aa19ed60b8c443.

Updated by aleksei prokofiev over 1 year ago Actions #6

  • Status changed from Feedback to Resolved

The patch has been tested and it fixes the issue.

Updated by Jim Pingle over 1 year ago Actions #7

  • Subject changed from PHP error after uncheck "Log firewall default blocks blok" in System logs to PHP error when saving System Log settings

Updated by Jim Pingle about 1 year ago Actions #8

  • Plus Target Version changed from 25.03 to 25.07
Actions

Also available in: Atom