Fix BasicAuthentication for websockets (#3219)

Signed-off-by: Jan N. Klug <github@klug.nrw>
This commit is contained in:
J-N-K 2022-12-12 08:56:25 +01:00 committed by GitHub
parent 1523a1f2ab
commit 32ea8dddd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -146,7 +146,7 @@ public class EventWebSocketServlet extends WebSocketServlet implements EventSubs
credentials = new UserApiTokenCredentials(token);
} else {
// try BasicAuthentication
String[] decodedParts = Base64.getDecoder().decode(token).toString().split(":");
String[] decodedParts = new String(Base64.getDecoder().decode(token)).split(":");
if (decodedParts.length == 2) {
credentials = new UsernamePasswordCredentials(decodedParts[0], decodedParts[1]);
}