Bug #14034
closed
PHP errors in ``xmlrpc.php`` during configuration synchronization if the target host has an empty XML tag for a given section
Added by Christopher Cope over 1 year ago.
Updated over 1 year ago.
Plus Target Version:
23.05
Description
There are several cases where xmlrpc is still accessing the config directly. This causes errors in PHP8 when the secondary has an empty, but existing tag.
The case below is when attempting to sync Virtual IPs to a secondary that doesn't have any Virtual IPs, but has a "<virtualip>" tag.
PHP ERROR: Type: 1, File: /usr/local/www/xmlrpc.php, Line: 399, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/xmlrpc.php:399
Stack trace:
#0 /usr/local/share/pear/XML/RPC2/Server/CallHandler/Instance.php(141): pfsense_xmlrpc_server->restore_config_section(Array, 900)
#1 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(135): XML_RPC2_Server_Callhandler_Instance->__call('pfsense.restore...', Array)
#2 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(99): XML_RPC2_Backend_Php_Server->getResponse()
#3 /usr/local/www/xmlrpc.php(988): XML_RPC2_Backend_Php_Server->handleCall()
#4 {main}
- Related to Bug #14000: PHP error with xmlrpc added
- Related to deleted (Bug #14000: PHP error with xmlrpc)
- Subject changed from PHP errors in xmlrpc.php to PHP errors in ``xmlrpc.php`` during HA config sync with empty tag on sync target
- Assignee set to Jim Pingle
- Target version set to 2.7.0
- Plus Target Version set to 23.05
If no VIP is defined on the primary, after any XMLRPC action, it will create an empty <virtualip></virtualip> tag on the secondary, and the PHP error will appear.
If there are no <virtualip></virtualip> tags on the primary and secondary and the Virtual IPs checkbox is unchecked under Select options to sync under System/High Availability Sync on primary, the empty <virtualip></virtualip> will not be created on the secondary after XMLRPC actions. And PHP error won't appear.
- Status changed from New to Feedback
- % Done changed from 0 to 100
I tested the patch against:
23.01-RELEASE (amd64)
built on Fri Feb 10 20:06:33 UTC 2023
FreeBSD 14.0-CURRENT
The patch fixes it. I am marking this ticket resolved.
- Status changed from Feedback to Resolved
- Subject changed from PHP errors in ``xmlrpc.php`` during HA config sync with empty tag on sync target to PHP errors in ``xmlrpc.php`` during configuration synchronization if the target host has an empty XML tag for a given section
Updating subject for release notes.
- Affected Version set to 2.7.0
Also available in: Atom
PDF