Call String.toLowerCase and .toUppercase with explicit locale
Closes gh-42719
This commit is contained in:
@@ -18,6 +18,7 @@ package org.springframework.boot.autoconfigure.security.oauth2.server.servlet;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.springframework.boot.autoconfigure.security.oauth2.server.servlet.OAuth2AuthorizationServerProperties.Client;
|
||||
import org.springframework.boot.autoconfigure.security.oauth2.server.servlet.OAuth2AuthorizationServerProperties.Registration;
|
||||
@@ -123,7 +124,7 @@ final class OAuth2AuthorizationServerPropertiesMapper {
|
||||
}
|
||||
|
||||
private JwsAlgorithm jwsAlgorithm(String signingAlgorithm) {
|
||||
String name = signingAlgorithm.toUpperCase();
|
||||
String name = signingAlgorithm.toUpperCase(Locale.ROOT);
|
||||
JwsAlgorithm jwsAlgorithm = SignatureAlgorithm.from(name);
|
||||
if (jwsAlgorithm == null) {
|
||||
jwsAlgorithm = MacAlgorithm.from(name);
|
||||
@@ -132,7 +133,7 @@ final class OAuth2AuthorizationServerPropertiesMapper {
|
||||
}
|
||||
|
||||
private SignatureAlgorithm signatureAlgorithm(String signatureAlgorithm) {
|
||||
return SignatureAlgorithm.from(signatureAlgorithm.toUpperCase());
|
||||
return SignatureAlgorithm.from(signatureAlgorithm.toUpperCase(Locale.ROOT));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user