Project

General

Profile

Actions

Bug #14474

closed

PHP error from empty ``<plugins>`` tag in ``config.xml``

Added by Christopher Cope 10 months ago. Updated 10 months ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
Dashboard
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
23.05.1
Release Notes:
Default
Affected Version:
2.7.0
Affected Architecture:

Description

The following error occurred preventing the GUI from opening.

Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/pfsense-utils.inc:3588
Stack trace:
#0 /etc/inc/system.inc(1484): pkg_call_plugins('plugin_nginx', Array)
#1 /etc/inc/system.inc(1219): system_generate_nginx_config('/var/etc/nginx-...', '-----BEGIN CERT...', '\r\n-----BEGIN PR...', '', 'nginx-webConfig...', '8443', '/usr/local/www/', 'cert.crt', 'cert.key', false, true)
#2 /etc/rc.restart_webgui(40): system_webgui_start()
#3 {main} 

occurred on
Netgate pfSense Plus version: 23.05-RELEASE
Built On: Mon May 22 15:04:36 UTC 2023

Seems to be caused by an empty plugins tag in the config. Needs to be updated to use the new accessor method.

Actions #1

Updated by Jim Pingle 10 months ago

  • Subject changed from PHP errors in pfsense-utils.inc to PHP error from empty ``<plugins>`` tag in ``config.xml``
  • Target version set to 2.7.0
  • Plus Target Version set to 23.09

Any idea how that bad tag made it into the configuration?

That isn't something we've seen in any testing before that I'm aware of.

Actions #2

Updated by Christopher Cope 10 months ago

Jim Pingle wrote in #note-1:

Any idea how that bad tag made it into the configuration?

That isn't something we've seen in any testing before that I'm aware of.

Sorry for not including more detail on the creation.

This is a customer config. They went from 2.6, on a fresh install, to 23.05 and restored their backup. The empty plugin tag is in the squid package section.

        <package>
            <name>squid3</name>
            <internal_name>squid</internal_name>
            <descr><![CDATA[High performance web proxy cache (3.4 branch). It combines Squid as a proxy server with its capabilities of acting as a HTTP / HTTPS reverse proxy.&lt;br /&gt;
            It includes an Exchange-Web-Access (OWA) Assistant, SSL filtering and antivirus integration via C-ICAP.]]></descr>
            <pkginfolink>https://forum.netgate.com/category/52/cache-proxy</pkginfolink>
            <website>http://www.squid-cache.org/</website>
            <version>0.4.45_8</version>
            <configurationfile>squid.xml</configurationfile>
            <filter_rule_function>squid_generate_rules</filter_rule_function>
            <plugins></plugins>
        </package>
Actions #3

Updated by Jim Pingle 10 months ago

They must have hit some other older bug first. At least on a current install, the squid package has two plugins listed (plugin_carp and plugin_certificates) and not an empty tag. There was an older bug some time ago that could lead to empty tags in certain cases, but it's been fixed for some time.

Not saying we won't fix this, but that it's hopefully a rare situation and not widespread.

Actions #4

Updated by Jim Pingle 10 months ago

  • Assignee changed from Christopher Cope to Jim Pingle
Actions #5

Updated by Jim Pingle 10 months ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #6

Updated by Jim Pingle 10 months ago

  • Plus Target Version changed from 23.09 to 23.05.1
  • Affected Version set to 2.7.0
Actions #7

Updated by Jim Pingle 10 months ago

  • Status changed from Feedback to Resolved

Looks OK here. I can't crash current builds with that empty tag.

Actions

Also available in: Atom PDF