From 1c5f20ab06bc65e2f0f7b428235e51655955727d Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Thu, 8 Feb 2018 23:55:35 +0100 Subject: [PATCH] Hide the @ sign in logs if username is empty Signed-off-by: David Sommerseth --- openvpn/client/clievent.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openvpn/client/clievent.hpp b/openvpn/client/clievent.hpp index e6889741..7a4cf6bd 100644 --- a/openvpn/client/clievent.hpp +++ b/openvpn/client/clievent.hpp @@ -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