Project

General

Profile

Actions

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 almost 2 years ago. Updated over 1 year ago.

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

100%

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

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}

Actions #1

Updated by Marcos M almost 2 years ago

  • Related to Bug #14000: PHP error with xmlrpc added
Actions #2

Updated by Jim Pingle almost 2 years ago

  • Related to deleted (Bug #14000: PHP error with xmlrpc)
Actions #3

Updated by Jim Pingle almost 2 years ago

  • 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
Actions #4

Updated by Danilo Zrenjanin almost 2 years ago

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.

Actions #5

Updated by Jim Pingle almost 2 years ago

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

Updated by Danilo Zrenjanin almost 2 years ago

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.

Actions #7

Updated by Danilo Zrenjanin almost 2 years ago

  • Status changed from Feedback to Resolved
Actions #8

Updated by Jim Pingle over 1 year ago

  • 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.

Actions #9

Updated by Jim Pingle over 1 year ago

  • Affected Version set to 2.7.0
Actions

Also available in: Atom PDF