Skip to content

Commit

Permalink
fix: base authentication array out of bound exception(#252)
Browse files Browse the repository at this point in the history
  • Loading branch information
xujimu committed Dec 14, 2022
1 parent 72156cc commit b3c0f3f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down

0 comments on commit b3c0f3f

Please sign in to comment.