Project

General

Profile

Actions

Bug #16661

open

UTF8 characters saved in the Client Identifier of DHCP static mappings result in an invalid config.xml file

Added by Lev Prokofev 2 days ago. Updated 2 days ago.

Status:
Feedback
Priority:
Normal
Assignee:
Category:
DHCP (IPv4)
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
26.03
Release Notes:
Default
Affected Version:
Affected Architecture:

Description

After the upgrade from 24.11 to 25.11, the system fails to complete boot with the following errors in CLI:

PHP ERROR: Type: 1, File: /etc/inc/config.lib.inc, Line: 1522, Message: Uncaught TypeError: pfSenseConfig::getConfig(): Return value must be of type array, int returned in /etc/inc/config.lib.inc:1522
Stack trace:
#0 /etc/inc/config.lib.inc(1493): pfSenseConfig->getConfig()
#1 /etc/inc/config.lib.inc(1487): pfSenseConfig->refreshConfig()
#2 /etc/inc/config.lib.inc(1372): pfSenseConfig->getConfigPath()
#3 /etc/inc/config.lib.inc(939): pfSenseConfigHistory->syncBackupCache()
#4 /etc/inc/config.lib.inc(718): cleanup_backupcache()
#5 /etc/inc/config.lib.inc(554): write_config()
#6 /etc/rc.bootup(169): convert_config()
#7 {main}

The reason was the DHCP section, which contained symbols like "é ê è ë" in the descriptions for DHCP static mappings.

example:

% perl -ne 'print "$.:$_" if /[^\x00-\x7F]/' dhcpd.xml
1968:                <descr><![CDATA[Pc de prêt]]></descr>
7330:                <descr><![CDATA[Synology vidéos]]></descr>
9999:                <descr><![CDATA[PC Traction de PEC donné à CHIMIE]]></descr>
11180:                <descr><![CDATA[PC Granulometre - Cecile Faurré]]></descr>

Despite that they are isolated by <![CDATA[ ... ]]> the system fails to read the config.

Tested on 25.11 release

Actions

Also available in: Atom PDF