Skip to content

Commit

Permalink
Fix for 33021
Browse files Browse the repository at this point in the history
changed string comparison from == to .equals().

(cherry picked from commit 4c43c7a)
  • Loading branch information
jainhitesh9998 authored and gsmet committed May 2, 2023
1 parent b4738de commit 4920fc2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ private static Key readTokenDecryptionKey(OidcTenantConfig oidcConfig) {
List<JsonWebKey> keys = KeyUtils.loadJsonWebKeys(keyContent);
if (keys != null && keys.size() == 1 &&
(keys.get(0).getAlgorithm() == null
|| keys.get(0).getAlgorithm() == KeyEncryptionAlgorithm.RSA_OAEP.getAlgorithm())
|| keys.get(0).getAlgorithm().equals(KeyEncryptionAlgorithm.RSA_OAEP.getAlgorithm()))
&& ("enc".equals(keys.get(0).getUse()) || keys.get(0).getUse() == null)) {
key = PublicJsonWebKey.class.cast(keys.get(0)).getPrivateKey();
}
Expand Down

0 comments on commit 4920fc2

Please sign in to comment.