Skip to contentSkip to conversation

Docs or Bug: --push options no longer require double quotes

Openvpn-devel [email protected]... 4 participants 5 messages Jul 25, 2015 – Jul 26, 2015

lore
Share & tools
lore
#0 lore raw

Hi

As the title states --push no longer requires options to be double quoted.

First tests:
https://forums.openvpn.net/topic19323.html#p53583

Sebsequent tests
Windows 2.3.7 i686-w64-mingw32 as either server or client Linux 2.3.7 i486-pc-linux-gnu as either server or client Linux git master as either server or client

From server config or CCD file

No errors generated

Options tested (Server and CCD )
push route-delay 5
push route 192.168.222.0 255.255.255.0
push comp-lzo no

Client log:
PUSH: Received control message: 'PUSH_REPLY,route-delay 5,route 192.168.222.0 255.255.255.0,comp-lzo no,

Is this a bug or a new feature or other ?

Thanks

#1 lore raw

Hi,

Quoted 1 line · On Sat, Jul 25, 2015 at 01:34:46PM +0100, [email protected]... 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?

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...
#2 lore raw

----- Original Message ----- From: "Gert Doering" <[email protected]...>
To: <[email protected]...>
Cc: <[email protected]>
Sent: Saturday, July 25, 2015 8:45 PM
Subject: Re: [Openvpn-devel] Docs or Bug: --push options no longer require double quotes

Quoted 8 lines

Hi,

Quoted 1 line · On Sat, Jul 25, 2015 at 01:34:46PM +0100, [email protected]... 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?

gert

I presume when the manual was written as per the link included. Quoting The manual ...

--push option
Push a config file option back to the client for remote execution. Note that option *must* be enclosed in double quotes ("").

Hence the question: Bug, feature or just docs out of date ?

Thanks

#3 lore raw
In reply to Gert Doering
Quoted 6 lines · Gert Doering

Hi,

Quoted 1 line · On Sat, Jul 25, 2015 at 01:34:46PM +0100, [email protected]... 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.

#4 lore raw

Hi Jonathan,

Quoted 25 lines · Jonathan K. Bullard
Quoted 5 lines · Gert Doering

Hi,

Quoted 1 line · On Sat, Jul 25, 2015 at 01:34:46PM +0100, [email protected]... 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]:

Quoted 7 lines

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.

very nicely put!
and it shows that the text "--push options no longer require double quotes" is actually false.
When using "--push" (i.e. a command line argument) you still must use double quotes.
When using "push" (i.e. inside a config file) then quotes do not seem necessary for some options, but that does not mean you should not use them.

So, neither bug or documentation error.

JJK