commit | a681283d9f05d041a00f3c9b6a7136ab3e6242ef | [log] [tgz] |
---|---|---|
author | David Ostrovsky <david@ostrovsky.org> | Tue Jan 11 09:23:01 2022 +0100 |
committer | David Ostrovsky <david@ostrovsky.org> | Tue Jan 11 09:28:43 2022 +0100 |
tree | 222bd5d6569c0f5512040a79a74e7861f970bebb | |
parent | 533b86c85d55cafa53ded66973902979aa6653cc [diff] |
AzureActiveDirectoryService: Use UrlDecoder for base64 decoding Bug: https://github.com/davido/gerrit-oauth-provider/issues/161 Change-Id: I6a803d30d4272dfbd1a70402a1dff23302317adb
diff --git a/src/main/java/com/googlesource/gerrit/plugins/oauth/AzureActiveDirectoryService.java b/src/main/java/com/googlesource/gerrit/plugins/oauth/AzureActiveDirectoryService.java index 81dc53f..49077fb 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/oauth/AzureActiveDirectoryService.java +++ b/src/main/java/com/googlesource/gerrit/plugins/oauth/AzureActiveDirectoryService.java
@@ -236,7 +236,7 @@ // Extract the payload part from the JWT token (header.payload.signature) by retrieving // tokenParts[1]. return gson.fromJson( - new String(Base64.getDecoder().decode(tokenParts[1]), StandardCharsets.UTF_8), + new String(Base64.getUrlDecoder().decode(tokenParts[1]), StandardCharsets.UTF_8), JsonObject.class); } }