]> git.ipfire.org Git - thirdparty/openvpn.git/commit
reload HTTP proxy credentials when moving to the next connection profile
authorAntonio Quartulli <a@unstable.cc>
Mon, 4 Dec 2017 04:49:07 +0000 (12:49 +0800)
committerDavid Sommerseth <davids@openvpn.net>
Wed, 6 Dec 2017 21:03:57 +0000 (22:03 +0100)
commit86b58ceb29cf1cc3acf32e2ff370d9a4af68c051
tree20f5b8f78514b2ba1dc2f31c1842a1fef4b970bb
parent5a0e82cb73ce072ef6cedc629d698cf873923bf6
reload HTTP proxy credentials when moving to the next connection profile

The HTTP proxy credentials are stored in a static variable that is
possibly initialized before each connection attempt.

However, the variable is never "released" therefore get_user_pass()
refuses to overwrite its content and leaves it as it is.
Consequently, if the user config contains multiple connection profiles
with different http-proxy, each having its own credentials, only the
first user/pass couple is loaded and the others are all ignored.
This leads to connection failures because the proper credentials are
not associated with the right proxy server.

The root of the misbehaviour seems to be located in the fact that,
despite the argument force passed to get_user_pass_http() being true,
no action is taken to release the static object containing the
credentials.

Fix the misbehaviour by releasing the http-proxy credential object
when the reload is "forced".

Trac: #836
Signed-off-by: Antonio Quartulli <a@unstable.cc>
Acked-by: Steffan Karger <steffan@karger.me>
Tested-by: David Sommerseth <davids@openvpn.net>
Acked-by: David Sommerseth <davids@openvpn.net>
Message-Id: <20171204044907.32261-1-a@unstable.cc>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg16007.html
Signed-off-by: David Sommerseth <davids@openvpn.net>
src/openvpn/proxy.c