Browse code

Introduce safety check for http proxy options

Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1395061013-1802-1-git-send-email-arne@rfc2549.org>
URL: http://article.gmane.org/gmane.network.openvpn.devel/8353

Signed-off-by: Gert Doering <gert@greenie.muc.de>

Arne Schwabe authored on 2014/03/17 21:56:53
Showing 1 changed files
... ...
@@ -1986,6 +1986,8 @@ options_postprocess_verify_ce (const struct options *options, const struct conne
1986 1986
 #ifdef ENABLE_HTTP_PROXY
1987 1987
   if ((ce->http_proxy_options) && ce->proto != PROTO_TCP_CLIENT)
1988 1988
     msg (M_USAGE, "--http-proxy MUST be used in TCP Client mode (i.e. --proto tcp-client)");
1989
+  if ((ce->http_proxy_options) && !ce->http_proxy_options->server)
1990
+    msg (M_USAGE, "--http-proxy not specified but other http proxy options present");
1989 1991
 #endif
1990 1992
 
1991 1993
 #if defined(ENABLE_HTTP_PROXY) && defined(ENABLE_SOCKS)