Bug #14474
closedPHP error from empty ``<plugins>`` tag in ``config.xml``
100%
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.
Updated by Jim Pingle over 1 year 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.
Updated by Christopher Cope over 1 year 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.<br /> 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>
Updated by Jim Pingle over 1 year 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.
Updated by Jim Pingle over 1 year ago
- Assignee changed from Christopher Cope to Jim Pingle
Updated by Jim Pingle over 1 year ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset 1dfacf5a5d66fe31d11f441f5055dd31da8e1e9c.
Updated by Jim Pingle over 1 year ago
- Plus Target Version changed from 23.09 to 23.05.1
- Affected Version set to 2.7.0
Updated by Jim Pingle over 1 year ago
- Status changed from Feedback to Resolved
Looks OK here. I can't crash current builds with that empty tag.