haproxy bug when adding a Frontend containing accented characters in description in generated XML entities
Running snapshot from 2022-12-30 and pfsense stable 2.6.0, same bug in haproxy package.
Adding a Frontend with accented characters causes a configuration rollback with error:
php-fpm 52446 /haproxy/haproxy_listeners_edit.php: Configuration Change: firstname.lastname@example.org (Local Database): Services: HAProxy: Frontend name: "" -> "support.clarisys.fr" desc: "" -> "Services de ticketing exposés sur internet" status: "" -> "active" type: "" -> "http" forwardfor: "" -> "yes" httpclose: "" -> "http-keep-alive" ssloffloadcert: "" -> "63b2b27c914b7" ssloffloadacl_an: "" -> "yes"
php-fpm 52446 /haproxy/haproxy_listeners_edit.php: XML error: Undeclared entity error at line 835 in /conf/config.xml
php-fpm 52446 /haproxy/haproxy_listeners_edit.php: pfSense is restoring the configuration /cf/conf/backup/config-1672664400.xml
php-fpm 52446 /haproxy/haproxy_listeners_edit.php: New alert found: pfSense is restoring the configuration /cf/conf/backup/config-1672664400.xml
A ./conf/config.xml.bad is thencreated.
That file contains a french accented character, generating a "é" HTML entity, as in the image attached below.
This causes invalid entity and a configuration rollback.
Updated by Kris Phillips 2 months ago
- Status changed from New to Confirmed
This issue is confirmed on pfSense Plus 23.01-BETA.
If you add an HAProxy frontend and attempt to use a special character in the name field, there is no issue and the sanity checks prevent this with a "Invalid characters in name" message. However, if you place special characters in the Description field for the frontend it will not run a sanity check and will cause HAProxy not to start if no config was previously present and will cause a rollback if it had a previous config.