Bug #9327
closedUsing the character "¤" in OpenVPN password field creates invalid config.xml
100%
Description
Hi!
Maybe you guys want to know about this one. First post for me to this bugtracker. Hope I'm doing things right here.
Using the character "¤" in OpenVPN password field creates invalid config.xml
(¤)
Error messages produced:
Feb 14 23:26:11 php-fpm /vpn_openvpn_client.php: New alert found: pfSense is restoring the configuration /cf/conf/backup/config-1550183040.xml
Feb 14 23:26:11 php-fpm /vpn_openvpn_client.php: pfSense is restoring the configuration /cf/conf/backup/config-1550183040.xml
Feb 14 23:26:11 php-fpm /vpn_openvpn_client.php: XML error: Undeclared entity error at line 3461 in /conf/config.xml
config.xml.bad
<auth_pass>zYdfrJn¤bE</auth_pass>
Heads up is that the OpenVPN client#.conf and related files are created /var/etc/openvpn and used by the OpenVPN, so you got a connection which is active without seening it under OpenVPN/Client or Status/OpenVPN.
Skipping the odd character does make it work as it should.
Made a post in the forum first.
https://forum.netgate.com/topic/140616/adding-client-configuration-results-in-automatic-restored-config-added-logs-show-connection
Updated by Jim Pingle almost 6 years ago
- Priority changed from Normal to Low
- Affected Version changed from 2.4.4_2 to All
- Affected Architecture All added
- Affected Architecture deleted (
)
It happens because that password field is not CDATA escaped or encoded with base64 in config.xml -- The character you entered is not valid in XML.
We can fix it, though, by changing the field in either of the ways I mentioned.
Updated by Jim Pingle about 5 years ago
- Assignee set to Jim Pingle
- Target version set to 2.5.0
Looks like the easiest fix is to CDATA escape that field.
Updated by Jim Pingle about 5 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset 327ad811aa5f965ba805ea78f879c759ca0fdafa.
Updated by Jim Pingle about 5 years ago
- Target version changed from 2.5.0 to 2.4.5
Updated by Jim Pingle almost 5 years ago
- Status changed from Feedback to Resolved
The problem password saves as expected on 2.4.5.a.20191218.2354 -- Field is CDATA protected and does not result in any errors.