On Sat, Jul 25, 2015 at 3:45 PM, Gert Doering <g...@greenie.muc.de> wrote:
> Hi,
>
> On Sat, Jul 25, 2015 at 01:34:46PM +0100, debbie...@gmail.com wrote:
>> As the title states --push no longer requires options to be double quoted.
>
> Well, *did* it require double quotes at some point?  If yes, when?

Double-quotes may not be required in a configuration file, but they
are required (or single-quotes, or the space must be escaped) if the
option is used on a command line, e.g.,

     openvpn --push "redirect-gateway def1" ...

Otherwise "redirect-gateway" is considered the "option" to --push, and
"def1" will be interpreted as something else (a config file? an
error?).

This is true of **any** single argument to an Openvpn command line
option: if it contains spaces or tabs, it must be enclosed in
double-quotes (or single-quotes, or have the spaces escaped with
backslashes).

It is also true of arguments in a configuration file if there is more
than one argument to the option and the first argument contains
spaces. For example, --secret file [direction]:

     secret "file-path with spaces" 0

I think it is best to always enclose any single argument that contains
spaces with double-quotes, even in a configuration file. This makes it
completely unambiguous, and future-proofs the file if a later version
of OpenVPN allows an optional argument to the option.

Reply via email to