0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-19 19:52:15 +02:00

Hide the @ sign in logs if username is empty

Signed-off-by: David Sommerseth <davids@openvpn.net>
This commit is contained in:
David Sommerseth 2018-02-08 23:55:35 +01:00 committed by Antonio Quartulli
parent 01ee1f5a41
commit 1c5f20ab06
No known key found for this signature in database
GPG Key ID: 07A53C580EF2CD74

View File

@ -275,7 +275,8 @@ namespace openvpn {
{
std::ostringstream out;
// eg. "godot@foo.bar.gov:443 (1.2.3.4) via TCPv4 on tun0/5.5.1.1"
out << user << '@';
if (!user.empty())
out << user << '@';
if (server_host.find_first_of(':') == std::string::npos)
out << server_host;
else