Opened 3 years ago

Last modified 3 years ago

#1361 new Bug / Defect

Unicode BOM in Configuration Files

Reported by: anotherCoward Owned by:
Priority: major Milestone: release 2.3.8
Component: Configuration Version: OpenVPN 2.3.8 (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords: unicode bom editor
Cc: tct

Description

The default Windows Notepad safes UTF-8 files with a BOM at the beginning of a text file if there are unicode chars contained, this can result in invalid login data or invalid config files. (https://en.wikipedia.org/wiki/Byte_order_mark)

This special char isn't displayed during editing within a lot of editors and finding the cause of this small error can be annoying.

The routine to read the files (*.ovpn or 'auth-user-pass'-file) should make use of this BOM identifier.

Change History (2)

comment:1 Changed 3 years ago by tct

Cc: tct added

comment:2 Changed 3 years ago by Gert Döring

Did you pick "version 2.3.8" intentionally? This is a very old version.

We do ignore BOMs at the beginning of the config file (*.ovpn), but we do not use it to signal "this is a unicode file", as openvpn does not really deal with charsets. The best bet is to stick to 7-bit ascii in the config file, and escape whatever you have that has unicode (like a certificate match).

We do not seem to skip it for username/password files, as far as I can see. Someone could send a patch.

Note: See TracTickets for help on using tickets.