Bug #15988
closedPHP error when saving System Log settings
100%
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 3 months ago
- 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 3 months ago
- 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 3 months ago
- 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 3 months ago
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 3 months ago
- Status changed from Confirmed to Feedback
- % Done changed from 0 to 100
Applied in changeset 48b2525bae3addc43e99444869aa19ed60b8c443.
Updated by aleksei prokofiev 3 months ago
- Status changed from Feedback to Resolved
The patch has been tested and it fixes the issue.
Updated by Jim Pingle 3 months ago
- Subject changed from PHP error after uncheck "Log firewall default blocks blok" in System logs to PHP error when saving System Log settings