From 6717094a10174223d716d0c296ad9e3f4413c173 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Thu, 5 Jan 2017 15:38:29 +0100 Subject: Sent username only for auth requests --- .../main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'main/src') diff --git a/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java b/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java index 92a9ecb7..c97f804e 100644 --- a/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java +++ b/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java @@ -566,11 +566,12 @@ public class OpenVpnManagementThread implements Runnable, OpenVPNManagement { pw = mProfile.getPasswordPrivateKey(); } else if (needed.equals("Auth")) { pw = mProfile.getPasswordAuth(); - } - if (pw != null) { + String usercmd = String.format("username '%s' %s\n", needed, VpnProfile.openVpnEscape(mProfile.mUsername)); managmentCommand(usercmd); + } + if (pw != null) { String cmd = String.format("password '%s' %s\n", needed, VpnProfile.openVpnEscape(pw)); managmentCommand(cmd); } else { -- cgit v1.2.3