Fix exception for empty basic auth header token
fixes spring-projectsgh-7976
This commit is contained in:
committed by
Eleftheria Stein-Kousathana
parent
3d5a1522d6
commit
935c547dde
@@ -87,6 +87,10 @@ public class BasicAuthenticationConverter implements AuthenticationConverter {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (header.equalsIgnoreCase(AUTHENTICATION_SCHEME_BASIC)) {
|
||||
throw new BadCredentialsException("Empty basic authentication token");
|
||||
}
|
||||
|
||||
byte[] base64Token = header.substring(6).getBytes(StandardCharsets.UTF_8);
|
||||
byte[] decoded;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user