diff --git a/src/main/java/com/github/monkeywie/proxyee/server/auth/BasicHttpProxyAuthenticationProvider.java b/src/main/java/com/github/monkeywie/proxyee/server/auth/BasicHttpProxyAuthenticationProvider.java index 539f83e..33a85bc 100644 --- a/src/main/java/com/github/monkeywie/proxyee/server/auth/BasicHttpProxyAuthenticationProvider.java +++ b/src/main/java/com/github/monkeywie/proxyee/server/auth/BasicHttpProxyAuthenticationProvider.java @@ -31,7 +31,9 @@ public BasicHttpToken authenticate(String authorization) { String token = authorization.substring(AUTH_TYPE_BASIC.length() + 1); String decode = new String(Base64.getDecoder().decode(token)); String[] arr = decode.split(":"); - usr = arr[0]; + if (arr.length >= 1) { + usr = arr[0]; + } if (arr.length >= 2) { pwd = arr[1]; }