summaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2017-01-05 15:38:29 +0100
committerArne Schwabe <arne@rfc2549.org>2017-01-05 15:38:41 +0100
commit6717094a10174223d716d0c296ad9e3f4413c173 (patch)
tree63370623220f8e4ac44bf3fe58dc1d6fec03d66a /main/src
parent797ffad681cef01ff1bf3ca9016c445f9bddacd1 (diff)
Sent username only for auth requests
Diffstat (limited to 'main/src')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java5
1 files changed, 3 insertions, 2 deletions
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 {