Reactive HttpBasic Support For Coloned Passwords

This makes so that reactive httpBasic supports passwords containing
one or more colons.
This commit is contained in:
Tim Koopman
2018-08-27 10:07:09 +08:00
committed by Josh Cummings
parent 9e0f171d47
commit 6df4dfe47b
2 changed files with 10 additions and 1 deletions

View File

@@ -54,7 +54,7 @@ public class ServerHttpBasicAuthenticationConverter implements
"" : authorization.substring(BASIC.length(), authorization.length());
byte[] decodedCredentials = base64Decode(credentials);
String decodedAuthz = new String(decodedCredentials);
String[] userParts = decodedAuthz.split(":");
String[] userParts = decodedAuthz.split(":", 2);
if (userParts.length != 2) {
return Mono.empty();